Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cae06ab9b9 | ||
|
|
79c2b8af49 | ||
|
|
6dcb8c16e2 | ||
|
|
ecde2ef97f | ||
|
|
f8bfd8f7a6 | ||
|
|
8b45797b2f | ||
|
|
3e831956ff | ||
|
|
999694fe4c |
38
Makefile
38
Makefile
@@ -8,19 +8,25 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
DEPENDS = glibc,util-linux
|
export SRCPKG = eudev
|
||||||
ARCH = x86_64
|
export DEPENDS = glibc,kmod,util-linux
|
||||||
URL = http://www.gentoo.org/proj/en/eudev/
|
export ARCH = x86_64
|
||||||
|
export URL = http://www.gentoo.org/proj/en/eudev/
|
||||||
|
export REPO = core
|
||||||
BRIEF = Fork of udev
|
BRIEF = Fork of udev
|
||||||
DESC = eudev is a fork of system-udev with the goal of obtaining better \
|
DESC = eudev is a fork of system-udev with the goal of obtaining better \
|
||||||
compatibility with existing software
|
compatibility with existing software
|
||||||
SNAPVER = 2
|
SNAPVER = 0
|
||||||
|
|
||||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||||
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||||
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
||||||
PATCHDIR := $(PWD)/SRC/patches
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
|
||||||
|
sed 's/^-//')-$(SNAPVER)
|
||||||
|
|
||||||
|
DEV := $(PWD)/eudev-dev
|
||||||
|
DEVROOT := $(DEV)/ROOT
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
@@ -56,10 +62,8 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
|||||||
--with-rootprefix= \
|
--with-rootprefix= \
|
||||||
--with-rootlibdir=/lib \
|
--with-rootlibdir=/lib \
|
||||||
--enable-split-usr \
|
--enable-split-usr \
|
||||||
--disable-static \
|
|
||||||
--enable-manpages \
|
--enable-manpages \
|
||||||
--enable-rule-generator \
|
--enable-rule-generator \
|
||||||
--disable-kmod \
|
|
||||||
--build=x86_64-snap-linux-gnu \
|
--build=x86_64-snap-linux-gnu \
|
||||||
--host=x86_64-snap-linux-gnu \
|
--host=x86_64-snap-linux-gnu \
|
||||||
--target=x86_64-snap-linux-gnu
|
--target=x86_64-snap-linux-gnu
|
||||||
@@ -74,7 +78,24 @@ $(ROOT): $(SRCDIR)/src/udev/udevd
|
|||||||
mkdir -v $(ROOT); \
|
mkdir -v $(ROOT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
|
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
|
||||||
|
install -v -d -m 755 $(ROOT)/etc/init.d && \
|
||||||
|
install -v -d -m 755 $(ROOT)/usr/share/eudev && \
|
||||||
|
mv -v $(ROOT)/etc/udev/udev.conf $(ROOT)/usr/share/eudev && \
|
||||||
|
install -v -m 755 $(PWD)/SNAP/udevd.init $(ROOT)/etc/init.d/udevd && \
|
||||||
|
install -v -m 644 $(PWD)/SNAP/udev.conf $(ROOT)/etc/udev/udev.conf
|
||||||
|
|
||||||
|
@install -v -d $(DEV)/SNAP && \
|
||||||
|
install -v -d $(DEVROOT) && \
|
||||||
|
for file in `find $(ROOT)|egrep 'pkgconfig\/|\.a$$|\.h$$'`; do \
|
||||||
|
path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \
|
||||||
|
mkdir -p $$path; \
|
||||||
|
mv $$file $$path; \
|
||||||
|
done && \
|
||||||
|
find $(ROOT) -type d -empty -delete && \
|
||||||
|
cd $(DEV) && make -f ../Makefile.eudev-dev && mv *.snap ../
|
||||||
|
|
||||||
|
@install -v -d -m 755 $(ROOT)/etc/udev/rules.d
|
||||||
|
|
||||||
test: $(ROOT)
|
test: $(ROOT)
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
@@ -82,6 +103,7 @@ test: $(ROOT)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rvf $(ROOT) \
|
@rm -rvf $(ROOT) \
|
||||||
|
$(DEV) \
|
||||||
$(SNAPINFO) \
|
$(SNAPINFO) \
|
||||||
$(MANIFEST) \
|
$(MANIFEST) \
|
||||||
$(FILES) \
|
$(FILES) \
|
||||||
|
|||||||
15
Makefile.eudev-dev
Normal file
15
Makefile.eudev-dev
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# This file is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
|
# published by the Free Software Foundation here:
|
||||||
|
# (http://www.gnu.org/licenses/gpl-2.0.html)
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
DEPENDS = eudev
|
||||||
|
BRIEF = Development files for eudev
|
||||||
|
DESC = Development files for eudev
|
||||||
|
|
||||||
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
38
SNAP/udevd.init
Executable file
38
SNAP/udevd.init
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: udev $time
|
||||||
|
# Required-Start:
|
||||||
|
# Required-Stop:
|
||||||
|
# Should-Start: modules mountvirtfs
|
||||||
|
# Should-Stop:
|
||||||
|
# Default-Start: S
|
||||||
|
# Default-Stop:
|
||||||
|
# Short-Description: Populate /dev and load kernel modules
|
||||||
|
# X-Required: true
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_init_msg "Starting udevd"
|
||||||
|
/sbin/udevd --daemon || error=1
|
||||||
|
|
||||||
|
/sbin/udevadm trigger --action=add --type=subsystems || error=1
|
||||||
|
/sbin/udevadm trigger --action=add --type=devices || error=1
|
||||||
|
/sbin/udevadm trigger --action=change --type=devices || error=1
|
||||||
|
/sbin/udevadm settle
|
||||||
|
|
||||||
|
[ -z $error ] && log_success_msg || log_failure_msg
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
log_init_msg "Reloading udev"
|
||||||
|
udevadm control --reload-rules && udevadm trigger && \
|
||||||
|
log_success_msg || log_failure_msg
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage $0 [start|stop|restart]"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
24
SNAP/usher
24
SNAP/usher
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -7,23 +7,17 @@ case $1 in
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
postinst)
|
postinst)
|
||||||
KERNEL_VER=`ls -C1rt ${TARGET}/boot/vmlinuz*|sed 's/.*vmlinuz-//'`
|
if [ ! -f /etc/udev/udev.conf ]; then
|
||||||
|
install -m 644 /usr/share/eudev/udev.conf /etc/udev/udev.conf
|
||||||
if [[ ${TARGET} ]]; then
|
|
||||||
echo "Running within ${TARGET} for kernel $KERNEL_VER"
|
|
||||||
if ! mountpoint -q ${TARGET}/proc; then
|
|
||||||
mount -t proc none ${TARGET}/proc
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chroot ${TARGET} /bin/bash -c "/sbin/mkinitramfs $KERNEL_VER"
|
if [ "$(stat -c %d/%i /)" = "$(stat -Lc %d/%i \
|
||||||
|
/proc/1/root 2>/dev/null)" ]; then
|
||||||
|
/etc/init.d/udevd restart
|
||||||
|
fi
|
||||||
|
|
||||||
if mountpoint -q ${TARGET}/proc; then
|
update-rc enable udevd
|
||||||
umount ${TARGET}/proc
|
mkinitramfs all
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Running for kernel $KERNEL_VER"
|
|
||||||
mkinitramfs $KERNEL_VER
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
prerm)
|
prerm)
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Binary file not shown.
@@ -1,17 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v2
|
|
||||||
|
|
||||||
iQIcBAABCAAGBQJXTy0eAAoJEGYZIgZZJvHWUZEP/1Zla1UrClRO335ClvQZNbcQ
|
|
||||||
GiFAsAue9EbfQc6ljiYwgVZPQ0N9NzbNI7A5By+pALw0w/NQFpYMYt4MqkRoK5SH
|
|
||||||
++/GzGIePIh4/f0+C+7uoTinGYjcoOIR6OMUYIzJD+oRxWRHWVd4ZVT/5mNgwW4z
|
|
||||||
8gEl7Ayj5Zxm0rK0m2EbIoUq80vrcJJmfnYO0mAI2mv1cDKK9H76IiHg2daHy58g
|
|
||||||
Yc3rG3/sxMfEmG8w3TFaJroF8KZVJcClTKs8ijQuosFVZtNvV1H18xhhCUA2FX09
|
|
||||||
3dNvfXhS0g9Hcb/OReCxGM7Ga6sm/KUv54WIWvtO5AMj+H1TFyyxc1IA6s4ttXjs
|
|
||||||
J8VLI8DCBlFfGcid2MvVyR7bkCs350Dt++wWVhdZ3uRgqasANcfq7DuzlNfGc3bW
|
|
||||||
fI04BZhCWGhqroVq/rLmYFm8bx2ZKqqtmvMCHZeXXbgZuyP8xwelM/90zT5c27eR
|
|
||||||
41zxq+CYWLp364RyVoKqxnjcLLlAim83e5jtC5HnTZJ6+YjGUxeU6X+qv+m/nLVv
|
|
||||||
cHvpKCSoOAtLckQSf/2276QKsHA5tgjayAWGzM6Ct8GwNQmqp5vIoZMmcSMAJvQP
|
|
||||||
20kqAEuK+qWq88bT5UYUdSuSQh7JLFM77xG4kHiFs2/PjCJAYFDJsTJ0f3xKyJbJ
|
|
||||||
9pVqWMR9BcAicbtS/Ipk
|
|
||||||
=SOmd
|
|
||||||
-----END PGP SIGNATURE-----
|
|
||||||
Reference in New Issue
Block a user