Index: Makefile
===================================================================
--- Makefile (nonexistent)
+++ Makefile (revision 5)
@@ -0,0 +1,361 @@
+
+COMPONENT_TARGETS = $(HARDWARE_INTEL_PC32)
+COMPONENT_TARGETS += $(HARDWARE_INTEL_PC64)
+COMPONENT_TARGETS += $(HARDWARE_EBOX_3350DX2)
+COMPONENT_TARGETS += $(HARDWARE_CB1X)
+COMPONENT_TARGETS += $(HARDWARE_CB2X)
+COMPONENT_TARGETS += $(HARDWARE_CB3X)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP2E)
+COMPONENT_TARGETS += $(HARDWARE_NANOPI_NEO)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PP)
+COMPONENT_TARGETS += $(HARDWARE_ORANGE_PL2)
+COMPONENT_TARGETS += $(HARDWARE_WECHIP_TX6)
+COMPONENT_TARGETS += $(HARDWARE_FFRK3288)
+COMPONENT_TARGETS += $(HARDWARE_POIN2)
+COMPONENT_TARGETS += $(HARDWARE_RK3328_CC)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_EDGE)
+COMPONENT_TARGETS += $(HARDWARE_LEEZ_P710)
+COMPONENT_TARGETS += $(HARDWARE_M201)
+COMPONENT_TARGETS += $(HARDWARE_MXV)
+COMPONENT_TARGETS += $(HARDWARE_P201)
+COMPONENT_TARGETS += $(HARDWARE_NEXBOX_A95X)
+COMPONENT_TARGETS += $(HARDWARE_ODROID_C2)
+COMPONENT_TARGETS += $(HARDWARE_P212)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM)
+COMPONENT_TARGETS += $(HARDWARE_Q201)
+COMPONENT_TARGETS += $(HARDWARE_ENYBOX_X2)
+COMPONENT_TARGETS += $(HARDWARE_KHADAS_VIM2)
+COMPONENT_TARGETS += $(HARDWARE_NIT6Q)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6DL_C)
+COMPONENT_TARGETS += $(HARDWARE_OKMX6Q_C)
+COMPONENT_TARGETS += $(HARDWARE_BONE_BLACK)
+COMPONENT_TARGETS += $(HARDWARE_OMAP5UEVM)
+COMPONENT_TARGETS += $(HARDWARE_DRA7XXEVM)
+COMPONENT_TARGETS += $(HARDWARE_CI20)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_T1)
+COMPONENT_TARGETS += $(HARDWARE_BAIKAL_M1)
+COMPONENT_TARGETS += $(HARDWARE_S824L)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN)
+COMPONENT_TARGETS += $(HARDWARE_S824L_LSB)
+COMPONENT_TARGETS += $(HARDWARE_VESNIN_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2)
+COMPONENT_TARGETS += $(HARDWARE_TL2WK2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_TL2SV2_LSB)
+COMPONENT_TARGETS += $(HARDWARE_SIFIVE_U740)
+
+
+NEED_ABS_PATH = true
+COMPONENT_IS_3PP = true
+
+
+include ../../../build-system/constants.mk
+
+
+SOURCE_REQUIRES = sources/GNOME/core/NetworkManager
+
+REQUIRES = app/sqlite/3.39.4.0
+REQUIRES += libs/jansson/2.13.1
+REQUIRES += libs/libpsl/0.21.1
+REQUIRES += libs/newt/0.52.21
+REQUIRES += net/ModemManager/1.16.4
+REQUIRES += net/iproute2/5.9.0
+REQUIRES += net/curl/7.75.0
+REQUIRES += net/libndp/1.7
+REQUIRES += net/bluez/5.62
+REQUIRES += net/ppp/2.4.9
+REQUIRES += net/nss/3.64
+
+# ======= __END_OF_REQUIRES__ =======
+
+
+version = 1.31.3
+tar_xz_archive = $(SRC_PACKAGE_PATH)/GNOME/core/NetworkManager/NetworkManager-$(version).tar.xz
+SRC_ARCHIVE = $(tar_xz_archive)
+SRC_DIR = $(TARGET_BUILD_DIR)/NetworkManager-$(version)
+src_dir_name = NetworkManager-$(version)
+src_done = $(TARGET_BUILD_DIR)/.source_done
+
+PATCHES = PATCHES
+
+build_target = $(TARGET_BUILD_DIR)/.build_done
+install_target = $(TARGET_BUILD_DIR)/.install_done
+
+nm_conf_d_dir = $(CURDIR)/conf.d
+nm_conf_dir = $(CURDIR)/conf
+
+
+####### Targets
+
+PKG_GROUP = net
+
+#
+# *PKG_NAME & *PKG_VERSION shouldn't be a reference to value.
+#
+LIBNM_PKG_NAME = NetworkManager
+LIBNM_PKG_VERSION = 1.31.3
+LIBNM_PKG_ARCH = $(PKGARCH)
+LIBNM_PKG_DISTRO_NAME = $(DISTRO_NAME)
+LIBNM_PKG_DISTRO_VERSION = $(DISTRO_VERSION)
+LIBNM_PKG_GROUP = $(PKG_GROUP)
+### |---handy-ruler-------------------------------|
+LIBNM_PKG_SHORT_DESCRIPTION = Networking that Just Works
+LIBNM_PKG_URL = $(BUG_URL)
+LIBNM_PKG_LICENSE = GPLv2
+LIBNM_PKG_DESCRIPTION_FILE = $(TARGET_BUILD_DIR)/$(LIBNM_PKG_NAME)-pkg-description
+LIBNM_PKG_DESCRIPTION_FILE_IN = $(LIBNM_PKG_NAME)-pkg-description.in
+LIBNM_PKG_INSTALL_SCRIPT = $(LIBNM_PKG_NAME)-pkg-install.sh
+
+LIBNM_PKG = $(CURDIR)/$(TARGET_BUILD_DIR)/$(LIBNM_PKG_NAME)-package
+
+pkg_basename = $(LIBNM_PKG_NAME)-$(LIBNM_PKG_VERSION)-$(LIBNM_PKG_ARCH)-$(LIBNM_PKG_DISTRO_NAME)-$(LIBNM_PKG_DISTRO_VERSION)
+
+pkg_archive = $(TARGET_BUILD_DIR)/$(PKG_GROUP)/$(pkg_basename).$(pkg_arch_suffix)
+pkg_certificate = $(call cert-name,$(pkg_archive))
+pkg_signature = $(call sign-name,$(pkg_archive))
+pkg_description = $(call desc-name,$(pkg_archive))
+products = $(call pkg-files,$(pkg_archive))
+
+BUILD_TARGETS = $(build_target)
+BUILD_TARGETS += $(install_target)
+
+PRODUCT_TARGETS = $(products)
+
+ROOTFS_TARGETS = $(pkg_archive)
+
+
+include ../../../build-system/core.mk
+
+
+env_sysroot = DESTDIR=$(LIBNM_PKG)
+
+
+#
+# Find the version number for pppd, used to specify the plugin directory:
+#
+pppd-version = $(shell echo $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pppd/?.?.? | rev | cut -f 1 -d / | rev)
+
+
+extra_configure_switches = --libdir=/usr/lib$(LIBSUFFIX)
+extra_configure_switches += --docdir=/usr/share/doc/$(src_dir_name)
+extra_configure_switches += --infodir=/usr/share/info
+extra_configure_switches += --mandir=/usr/share/man
+extra_configure_switches += --sysconfdir=/etc
+extra_configure_switches += --localstatedir=/var
+
+extra_configure_switches += --enable-polkit=no
+extra_configure_switches += --enable-vala=no
+extra_configure_switches += --enable-introspection=no
+
+extra_configure_switches += --with-udev-dir=/lib/udev
+extra_configure_switches += --with-pppd-plugin-dir=/usr/lib$(LIBSUFFIX)/pppd/$(pppd-version)
+extra_configure_switches += --with-crypto=nss
+extra_configure_switches += --enable-more-warnings=no
+extra_configure_switches += --without-resolvconf
+extra_configure_switches += --with-dhcpcd=/sbin/dhcpcd
+extra_configure_switches += --with-dhclient=yes
+extra_configure_switches += --with-modem-manager-1=yes
+extra_configure_switches += --with-nmtui=yes
+extra_configure_switches += --enable-json-validation
+extra_configure_switches += --enable-ovs
+extra_configure_switches += --with-consolekit=no
+extra_configure_switches += --with-session-tracking=elogind
+extra_configure_switches += --with-suspend-resume=elogind
+extra_configure_switches += --with-hostname-persist=$(DISTRO_NAME)
+
+ifeq ($(__ENABLE_STATIC__),yes)
+extra_configure_switches += --enable-static=yes
+else
+extra_configure_switches += --enable-static=no
+endif
+extra_configure_switches += --enable-shared=yes
+
+
+LDFLAGS += -Wl,-rpath=/lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+TARGET_BIN_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX)
+TARGET_LIB_RPATH = /lib$(LIBSUFFIX):/usr/lib$(LIBSUFFIX):/usr/lib/../lib$(LIBSUFFIX)
+
+
+####### Dependencies
+
+$(src_done): $(SRC_ARCHIVE) $(PATCHES_DEP)
+ $(UNPACK_SRC_ARCHIVE)
+ $(APPLY_PATCHES)
+ @touch $@
+
+$(build_target): $(src_done)
+ @cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) INTLTOOL_PERL=/usr/bin/perl ../$(src_dir_name)/configure \
+ --prefix=/usr \
+ --build=$(BUILD) \
+ --host=$(TARGET) \
+ $(extra_configure_switches)
+ @cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE)
+ @touch $@
+
+$(install_target): $(build_target)
+ @mkdir -p $(LIBNM_PKG)
+ @cd $(SRC_DIR) && $(BUILD_ENVIRONMENT) $(MAKE) -j1 install $(env_sysroot)
+ # ======= Move dbus configs to system location: =======
+ @mkdir -p $(LIBNM_PKG)/usr/share/dbus-1/system.d/
+ @mv $(LIBNM_PKG)/etc/dbus-1/system.d/* $(LIBNM_PKG)/usr/share/dbus-1/system.d/
+ @rm -rf $(LIBNM_PKG)/etc/dbus-1
+ # ======= Install rc script =======
+ @mkdir -p $(LIBNM_PKG)/etc/rc.d
+ @cat $(nm_conf_dir)/rc.networkmanager > $(LIBNM_PKG)/etc/rc.d/rc.networkmanager.new
+ @chmod 0755 $(LIBNM_PKG)/etc/rc.d/rc.networkmanager.new
+ # ======= Add default (plain) config file to enable keyfile plugin =======
+ @cat $(nm_conf_dir)/NetworkManager.conf > $(LIBNM_PKG)/etc/NetworkManager/NetworkManager.conf.new
+ # ======= Add default polkit rules for NM =======
+ @mkdir -p $(LIBNM_PKG)/usr/share/polkit-1/rules.d
+ @cat $(nm_conf_dir)/10-org.freedesktop.NetworkManager.rules > $(LIBNM_PKG)/usr/share/polkit-1/rules.d/10-org.freedesktop.NetworkManager.rules
+ # ======= Set dhcp client to "dhcpcd" and rc-manager to "file" by default =======
+ @mkdir -p $(LIBNM_PKG)/etc/NetworkManager/conf.d
+ @cat $(nm_conf_d_dir)/00-dhcp-client.conf > $(LIBNM_PKG)/etc/NetworkManager/conf.d/00-dhcp-client.conf.new
+ @cat $(nm_conf_d_dir)/00-rc-manager.conf > $(LIBNM_PKG)/etc/NetworkManager/conf.d/00-rc-manager.conf.new
+ # ======= Install Documentation =======
+ @( cd $(LIBNM_PKG)/usr/share/man/man1 ; \
+ for file in nmtui-{connect,edit,hostname} ; do \
+ rm -f $${file}.1 ; ln -sf nmtui.1 $${file}.1 ; \
+ done ; \
+ )
+ @( cd $(LIBNM_PKG)/usr/share/man/man5 ; \
+ ln -sf NetworkManager.conf.5 nm-system-settings.conf.5 ; \
+ rm -f nm-settings-nmcli.5 ; \
+ ln -sf nm-settings.5 nm-settings-nmcli.5 ; \
+ )
+ @if [ -d $(LIBNM_PKG)/usr/share/man ]; then \
+ ( cd $(LIBNM_PKG)/usr/share/man ; \
+ for manpagedir in `find . -type d -name "man*"` ; do \
+ ( cd $$manpagedir ; \
+ for eachpage in `find . -type l -maxdepth 1` ; do \
+ ln -s `readlink $$eachpage`.gz $$eachpage.gz ; \
+ rm $$eachpage ; \
+ done ; \
+ gzip -9 *.? ; \
+ ) \
+ done \
+ ) \
+ fi
+ @mkdir -p $(LIBNM_PKG)/usr/doc/$(src_dir_name)
+ @cp -a $(SRC_DIR)/AUTHORS $(SRC_DIR)/COPYING* \
+ $(LIBNM_PKG)/usr/doc/$(src_dir_name)
+ @mkdir -p $(LIBNM_PKG)/usr/share/doc/$(src_dir_name)/html/{api,libnm}
+ @( cd $(SRC_DIR) ; \
+ cp -a AUTHORS COPYING* README TODO \
+ $(LIBNM_PKG)/usr/share/doc/$(src_dir_name) ; \
+ )
+ @( cd $(SRC_DIR)/docs ; \
+ cp -a api/html/*.{html,css,png} \
+ $(LIBNM_PKG)/usr/share/doc/$(src_dir_name)/html/api ; \
+ cp -a libnm/html/*.{html,css,png} \
+ $(LIBNM_PKG)/usr/share/doc/$(src_dir_name)/html/libnm ; \
+ )
+ @rm -rf $(LIBNM_PKG)/usr/share/gtk-doc
+ @( cd $(SRC_DIR) ; \
+ if [ -r ChangeLog ]; then \
+ DOCSDIR=`echo $(LIBNM_PKG)/usr/share/doc/$(src_dir_name)` ; \
+ cat ChangeLog | head -n 1000 > $$DOCSDIR/ChangeLog ; \
+ touch -r ChangeLog $$DOCSDIR/ChangeLog ; \
+ fi \
+ )
+ @( cd $(SRC_DIR) ; \
+ if [ -r NEWS ]; then \
+ DOCSDIR=`echo $(LIBNM_PKG)/usr/share/doc/$(src_dir_name)` ; \
+ cat NEWS | head -n 1000 > $$DOCSDIR/NEWS ; \
+ touch -r NEWS $$DOCSDIR/NEWS ; \
+ fi \
+ )
+ # ======= remove toolchain path from target libtool *.la files =======
+ @( cd $(LIBNM_PKG)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" libnm.la ; \
+ )
+ @( cd $(LIBNM_PKG)/usr/lib$(LIBSUFFIX)/NetworkManager/$(version) ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" libnm-device-plugin-adsl.la libnm-device-plugin-bluetooth.la \
+ libnm-device-plugin-ovs.la libnm-device-plugin-wifi.la \
+ libnm-device-plugin-wwan.la libnm-ppp-plugin.la \
+ libnm-wwan.la ; \
+ )
+ @( cd $(LIBNM_PKG)/usr/lib$(LIBSUFFIX)/pppd/$(pppd-version) ; \
+ sed -i "s,$(TARGET_DEST_DIR),,g" nm-pppd-plugin.la ; \
+ )
+ # ======= Install the same to $(TARGET_DEST_DIR) =======
+ $(call install-into-devenv, $(LIBNM_PKG))
+ # ======= Tune libtool *.la search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX) ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libnm.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libnm.la ; \
+ )
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/NetworkManager/$(version) ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libnm-device-plugin-adsl.la libnm-device-plugin-bluetooth.la \
+ libnm-device-plugin-ovs.la libnm-device-plugin-wifi.la \
+ libnm-device-plugin-wwan.la libnm-ppp-plugin.la \
+ libnm-wwan.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" libnm-device-plugin-adsl.la libnm-device-plugin-bluetooth.la \
+ libnm-device-plugin-ovs.la libnm-device-plugin-wifi.la \
+ libnm-device-plugin-wwan.la libnm-ppp-plugin.la \
+ libnm-wwan.la ; \
+ )
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pppd/$(pppd-version) ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" nm-pppd-plugin.la ; \
+ sed -i "s,L/lib,L$(TARGET_DEST_DIR)/lib,g" nm-pppd-plugin.la ; \
+ )
+ # ======= Tune pkg-config *.pc search path to the target destination for development =======
+ @( cd $(TARGET_DEST_DIR)/usr/lib$(LIBSUFFIX)/pkgconfig ; \
+ sed -i "s,/usr,$(TARGET_DEST_DIR)/usr,g" libnm.pc ; \
+ )
+ # ======= Strip binaries =======
+ @( cd $(LIBNM_PKG) ; \
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs $(STRIP) --strip-unneeded 2> /dev/null ; \
+ )
+ifeq ($(__ENABLE_STATIC__),yes)
+ @( cd $(LIBNM_PKG) ; \
+ find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs $(STRIP) -g 2> /dev/null ; \
+ )
+endif
+ifneq ($(PATCHELF),)
+ # ======= Set RPATH/RUNPATH for target binaries =======
+ @( cd $(LIBNM_PKG)/usr ; \
+ for file in `find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_BIN_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+ # ======= Set RPATH/RUNPATH for target shared objects =======
+ @( cd $(LIBNM_PKG)/usr/lib$(LIBSUFFIX) ; \
+ for file in `find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs echo` ; do \
+ rpath=`$(PATCHELF) --print-rpath $$file 2> /dev/null` ; \
+ if echo "$$rpath" | grep -q "$(TARGET_DEST_DIR)" ; then \
+ $(PATCHELF) --set-rpath $(TARGET_LIB_RPATH) $$file 1> /dev/null 2> /dev/null ; \
+ fi ; \
+ done ; \
+ )
+endif
+ @touch $@
+
+$(LIBNM_PKG_DESCRIPTION_FILE): $(LIBNM_PKG_DESCRIPTION_FILE_IN)
+ @cat $< | $(SED) -e "s/@VERSION@/$(version)/g" > $@
+
+$(pkg_certificate) : $(pkg_archive) ;
+$(pkg_signature) : $(pkg_archive) ;
+$(pkg_description) : $(pkg_archive) ;
+
+$(pkg_archive): $(install_target) $(LIBNM_PKG_DESCRIPTION_FILE) $(LIBNM_PKG_INSTALL_SCRIPT)
+ @cp $(LIBNM_PKG_DESCRIPTION_FILE) $(LIBNM_PKG)/.DESCRIPTION
+ @cp $(LIBNM_PKG_INSTALL_SCRIPT) $(LIBNM_PKG)/.INSTALL
+ @$(BUILD_PKG_REQUIRES) $(LIBNM_PKG)/.REQUIRES
+ @echo "pkgname=$(LIBNM_PKG_NAME)" > $(LIBNM_PKG)/.PKGINFO ; \
+ echo "pkgver=$(LIBNM_PKG_VERSION)" >> $(LIBNM_PKG)/.PKGINFO ; \
+ echo "arch=$(LIBNM_PKG_ARCH)" >> $(LIBNM_PKG)/.PKGINFO ; \
+ echo "distroname=$(LIBNM_PKG_DISTRO_NAME)" >> $(LIBNM_PKG)/.PKGINFO ; \
+ echo "distrover=$(LIBNM_PKG_DISTRO_VERSION)" >> $(LIBNM_PKG)/.PKGINFO ; \
+ echo "group=$(LIBNM_PKG_GROUP)" >> $(LIBNM_PKG)/.PKGINFO ; \
+ echo "short_description=\"$(LIBNM_PKG_SHORT_DESCRIPTION)\"" >> $(LIBNM_PKG)/.PKGINFO ; \
+ echo "url=$(LIBNM_PKG_URL)" >> $(LIBNM_PKG)/.PKGINFO ; \
+ echo "license=$(LIBNM_PKG_LICENSE)" >> $(LIBNM_PKG)/.PKGINFO
+ @$(PSEUDO) sh -c "cd $(LIBNM_PKG) && \
+ chown -R root:root . && \
+ $(MAKE_PACKAGE) -J --linkadd=yes $(GNUPG_OPTIONS) -m -d .. ."
Index: NetworkManager-pkg-description.in
===================================================================
--- NetworkManager-pkg-description.in (nonexistent)
+++ NetworkManager-pkg-description.in (revision 5)
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+NetworkManager: NetworkManager @VERSION@ (Networking that Just Works)
+NetworkManager:
+NetworkManager: The point of NetworkManager is to make networking configuration and
+NetworkManager: setup as painless and automatic as possible. NetworkManager sets IP
+NetworkManager: addresses, default routes, associating with wireless access points
+NetworkManager: or wired LANs, and other network configuration settings in a simple,
+NetworkManager: automated fashion (manual overrides are still possible).
+NetworkManager:
+NetworkManager: Home page: http://projects.gnome.org/NetworkManager/
+NetworkManager:
+NetworkManager:
Index: NetworkManager-pkg-install.sh
===================================================================
--- NetworkManager-pkg-install.sh (nonexistent)
+++ NetworkManager-pkg-install.sh (revision 5)
@@ -0,0 +1,73 @@
+#!/bin/sh
+
+# Preserve new files
+install_file() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ touch -r $NEW ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ install_file $NEW
+}
+
+
+# arg 1: the new package version
+pre_install() {
+ /bin/true
+}
+
+# arg 1: the new package version
+post_install() {
+ preserve_perms etc/rc.d/rc.networkmanager.new
+ install_file etc/NetworkManager/NetworkManager.conf.new
+ install_file etc/NetworkManager/conf.d/00-rc-manager.conf.new
+ install_file etc/NetworkManager/conf.d/00-dhcp-client.conf.new
+
+ # If the .pid file is found in the old location, move it to the new one:
+ if [ -r var/run/NetworkManager.pid ]; then
+ mv var/run/NetworkManager.pid var/run/NetworkManager/NetworkManager.pid
+ fi
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+pre_update() {
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_update() {
+ post_install
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+
+operation=$1
+shift
+
+$operation $*
Property changes on: NetworkManager-pkg-install.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: PATCHES
===================================================================
Index: conf/10-org.freedesktop.NetworkManager.rules
===================================================================
--- conf/10-org.freedesktop.NetworkManager.rules (nonexistent)
+++ conf/10-org.freedesktop.NetworkManager.rules (revision 5)
@@ -0,0 +1,7 @@
+polkit.addRule(function(action, subject) {
+ if (action.id.indexOf("org.freedesktop.NetworkManager.") == 0 &&
+ subject.isInGroup("netdev")) {
+ return polkit.Result.YES;
+ }
+});
+
Index: conf/NetworkManager.conf
===================================================================
--- conf/NetworkManager.conf (nonexistent)
+++ conf/NetworkManager.conf (revision 5)
@@ -0,0 +1,9 @@
+# /etc/NetworkManager/NetworkManager.conf
+#
+# See additional config files (such as for DHCP settings) in ./conf.d
+
+[main]
+plugins=keyfile
+
+[device]
+wifi.scan-rand-mac-address=no
Index: conf/rc.networkmanager
===================================================================
--- conf/rc.networkmanager (nonexistent)
+++ conf/rc.networkmanager (revision 5)
@@ -0,0 +1,113 @@
+#!/bin/sh
+#
+# NetworkManager: NetworkManager daemon
+#
+# description: This is a daemon for automatically switching network \
+# connections to the best available connection. \
+#
+# processname: NetworkManager
+# pidfile: /var/run/NetworkManager/NetworkManager.pid
+#
+
+prefix=/usr
+exec_prefix=/usr
+sbindir=${exec_prefix}/sbin
+
+NETWORKMANAGER_BIN=${sbindir}/NetworkManager
+
+# Sanity checks.
+[ -x $NETWORKMANAGER_BIN ] || exit 0
+
+PIDFILE=/var/run/NetworkManager/NetworkManager.pid
+
+nm_start()
+{
+ if [ "`pgrep dbus-daemon`" = "" ]; then
+ echo "D-BUS must be running to start NetworkManager"
+ return
+ fi
+
+ # Just in case the pidfile is still there, we may need to nuke it.
+ if [ -e "$PIDFILE" ]; then
+ rm -f $PIDFILE
+ fi
+
+ echo "Starting NetworkManager daemon: $NETWORKMANAGER_BIN"
+ XDG_CACHE_HOME=/root/.cache $NETWORKMANAGER_BIN
+}
+
+nm_status()
+{
+ local pidlist=`cat $PIDFILE 2>/dev/null`
+ if [ -z "$pidlist" ]; then
+ return 1
+ fi
+ local command=`ps -p $pidlist -o comm=`
+ if [ "$command" != 'NetworkManager' ]; then
+ return 1
+ fi
+}
+
+nm_stop()
+{
+ echo -en "Stopping NetworkManager: "
+ # Shut down any DHCP connections, otherwise the processes will be orphaned
+ # and the connections will not come up when NetworkManager restarts.
+ if ps ax | grep /sbin/dhcpcd | grep -q libexec/nm-dhcp ; then
+ ps ax | grep /sbin/dhcpcd | grep libexec/nm-dhcp | while read line ; do
+ kill -HUP $(echo $line | cut -b 1-5)
+ done
+ fi
+ if ps ax | grep /sbin/dhclient | grep -q /var/lib/NetworkManager ; then
+ ps ax | grep /sbin/dhclient | grep /var/lib/NetworkManager | while read line ; do
+ kill -HUP $(echo $line | cut -b 1-5)
+ done
+ fi
+ local pidlist=`cat $PIDFILE 2>/dev/null`
+ if [ ! -z "$pidlist" ]; then
+ kill $pidlist &>/dev/null
+ sleep 3
+ rm -f $PIDFILE &>/dev/null
+ fi
+ # If wpa_supplicant is running here, it needs to be shut down as well.
+ # Since you're asking for NetworkManager to shut down, we have to assume
+ # that wpa_supplicant was started by it.
+ if [ -r /var/run/wpa_supplicant.pid ]; then
+ kill $(cat /var/run/wpa_supplicant.pid)
+ elif [ -r /run/wpa_supplicant.pid ]; then
+ kill $(cat /run/wpa_supplicant.pid)
+ fi
+ echo "stopped";
+ sleep 3
+}
+
+nm_restart()
+{
+ nm_stop
+ nm_start
+}
+
+case "$1" in
+ 'start')
+ if ( ! nm_status ); then
+ nm_start
+ else
+ echo "NetworkManager is already running (will not start it twice)."
+ fi
+ ;;
+ 'stop')
+ nm_stop
+ ;;
+ 'restart')
+ nm_restart
+ ;;
+ 'status')
+ if ( nm_status ); then
+ echo "NetworkManager is currently running"
+ else
+ echo "NetworkManager is not running."
+ fi
+ ;;
+ *)
+ echo "usage $0 start|stop|status|restart"
+esac
Index: conf
===================================================================
--- conf (nonexistent)
+++ conf (revision 5)
Property changes on: conf
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: conf.d/00-dhcp-client.conf
===================================================================
--- conf.d/00-dhcp-client.conf (nonexistent)
+++ conf.d/00-dhcp-client.conf (revision 5)
@@ -0,0 +1,8 @@
+[main]
+# Choose a DHCP client below. Upstream recommends internal, but results may vary.
+# dhcpcd is the DHCP client usually used by Slackware:
+dhcp=dhcpcd
+# dhclient is the ISC reference DHCP client, part of the dhcp package:
+#dhcp=dhclient
+# This is a simple DHCP client that is built into NetworkManager:
+#dhcp=internal
Index: conf.d/00-rc-manager.conf
===================================================================
--- conf.d/00-rc-manager.conf (nonexistent)
+++ conf.d/00-rc-manager.conf (revision 5)
@@ -0,0 +1,2 @@
+[main]
+rc-manager=file
Index: conf.d
===================================================================
--- conf.d (nonexistent)
+++ conf.d (revision 5)
Property changes on: conf.d
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- . (nonexistent)
+++ . (revision 5)
Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~