Merge branch 'master' of git+ssh://git.overlays.gentoo.org/proj/releng
This commit is contained in:
commit
7f8821bdce
193 changed files with 7552 additions and 3150 deletions
|
@ -1,6 +1,6 @@
|
|||
distdir="/usr/portage/distfiles"
|
||||
portdir="/release/trees/portage-auto"
|
||||
options="autoresume bindist kerncache pkgcache preserve_libs seedcache snapcache"
|
||||
options="autoresume bindist pkgcache preserve_libs seedcache snapcache"
|
||||
sharedir="/usr/lib64/catalyst/"
|
||||
storedir="/release/buildroot/amd64-dev"
|
||||
snapshot_cache="/release/tmp/snapshots"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
distdir="/release/tmp/distfiles"
|
||||
portdir="/release/portage"
|
||||
options="ccache pkgcache autoresume snapcache seedcache kerncache"
|
||||
options="autoresume ccache pkgcache seedcache snapcache"
|
||||
sharedir="/usr/lib/catalyst/"
|
||||
storedir="/release/buildroot/amd64-dev"
|
||||
envscript="/etc/catalyst/amd64-dev.env"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
distdir="/usr/portage/distfiles"
|
||||
portdir="/release/trees/portage-auto"
|
||||
options="autoresume bindist kerncache pkgcache preserve_libs seedcache snapcache"
|
||||
options="autoresume bindist pkgcache preserve_libs seedcache snapcache"
|
||||
sharedir="/usr/lib64/catalyst/"
|
||||
storedir="/release/buildroot/x86-dev"
|
||||
snapshot_cache="/release/tmp/snapshots"
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,2 @@
|
|||
>=dev-lang/python-3
|
||||
sys-apps/module-init-tools
|
||||
sys-apps/modutils
|
||||
|
|
|
@ -4,4 +4,5 @@ version_stamp: 2008.0
|
|||
rel_type: default
|
||||
profile: default/linux/alpha/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-alpha-2008.0
|
||||
source_subpath: default/stage3-alpha-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armeb-2008.0
|
||||
source_subpath: default/stage3-armeb-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv4l-2008.0
|
||||
source_subpath: default/stage3-armv4l-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -6,3 +6,4 @@ profile: default/linux/arm/13.0
|
|||
snapshot: 2008.0
|
||||
source_subpath: seed
|
||||
cflags: -O2 -pipe -mcpu=strongarm
|
||||
update_seed: yes
|
||||
|
|
|
@ -6,3 +6,4 @@ profile: default/linux/arm/13.0
|
|||
snapshot: 2008.0
|
||||
source_subpath: seed
|
||||
cflags: -O2 -pipe -mcpu=strongarm110
|
||||
update_seed: yes
|
||||
|
|
|
@ -6,3 +6,4 @@ profile: default/linux/arm/13.0
|
|||
snapshot: 2008.0
|
||||
source_subpath: seed
|
||||
cflags: -O2 -pipe -mcpu=strongarm1100
|
||||
update_seed: yes
|
||||
|
|
|
@ -6,3 +6,4 @@ profile: default/linux/arm/13.0
|
|||
snapshot: 2008.0
|
||||
source_subpath: seed
|
||||
cflags: -O2 -pipe -mcpu=strongarm1110
|
||||
update_seed: yes
|
||||
|
|
|
@ -6,3 +6,4 @@ profile: default/linux/arm/13.0
|
|||
snapshot: 2008.0
|
||||
source_subpath: seed
|
||||
cflags: -Os -march=armv4t -mtune=arm920t
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0/armv4t
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv4tl-2008.0
|
||||
source_subpath: default/stage3-armv4tl-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv5teb-2008.0
|
||||
source_subpath: default/stage3-armv5teb-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv5tejl-2008.0
|
||||
source_subpath: default/stage3-armv5tejl-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0/armv5te
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv5tel-2008.0
|
||||
source_subpath: default/stage3-armv5tel-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv5tl-2008.0
|
||||
source_subpath: default/stage3-armv5tl-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,5 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0/armv6j
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv6j_hardfp-2008.0
|
||||
|
||||
source_subpath: default/stage3-armv6j_hardfp-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0/armv6j
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv6j-2008.0
|
||||
source_subpath: default/stage3-armv6j-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,5 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0/armv7a
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv7a_hardfp-2008.0
|
||||
|
||||
source_subpath: default/stage3-armv7a_hardfp-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0/armv7a
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-armv7a-2008.0
|
||||
source_subpath: default/stage3-armv7a-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/arm/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-arm-2008.0
|
||||
source_subpath: default/stage3-arm-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ version_stamp: 2008.0
|
|||
rel_type: default
|
||||
profile: default/linux/hppa/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-hppa1.1-2008.0
|
||||
source_subpath: default/stage3-hppa1.1-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ version_stamp: 2008.0
|
|||
rel_type: default
|
||||
profile: default/linux/hppa/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-hppa2.0-2008.0
|
||||
source_subpath: default/stage3-hppa2.0-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -17,7 +17,7 @@ livecd/volid: Gentoo Linux IA64 2008.0
|
|||
boot/kernel: gentoo
|
||||
|
||||
boot/kernel/gentoo/sources: gentoo-sources
|
||||
boot/kernel/gentoo/config: ../../kconfig/ia64/installcd-2.6.39.config
|
||||
boot/kernel/gentoo/config: ../../kconfig/ia64/installcd-3.8.13.config
|
||||
boot/kernel/gentoo/use:
|
||||
-*
|
||||
atm
|
||||
|
|
|
@ -5,3 +5,4 @@ rel_type: default
|
|||
profile: default/linux/ia64/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-ia64-2008.0
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ version_stamp: 2008.0
|
|||
rel_type: default
|
||||
profile: default/linux/powerpc/ppc32/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-ppc-2008.0
|
||||
source_subpath: default/stage3-ppc-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -8,3 +8,4 @@ source_subpath: embedded/stage3-ppc-uclibc-hardened-2008.0
|
|||
cflags: -Os -pipe
|
||||
ldflags: -Wl,-O1
|
||||
chost: powerpc-gentoo-linux-uclibc
|
||||
update_seed: yes
|
||||
|
|
|
@ -8,3 +8,4 @@ source_subpath: embedded/stage3-ppc-uclibc-softfloat-2008.0
|
|||
cflags: -Os -pipe
|
||||
ldflags: -Wl,-O1
|
||||
chost: powerpc-softfloat-linux-uclibc
|
||||
update_seed: yes
|
||||
|
|
|
@ -8,3 +8,4 @@ source_subpath: embedded/stage3-ppc-uclibc-2008.0
|
|||
cflags: -Os -pipe
|
||||
ldflags: -Wl,-O1
|
||||
chost: powerpc-gentoo-linux-uclibc
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,5 +4,5 @@ version_stamp: 32ul-2008.0
|
|||
rel_type: default
|
||||
profile: default/linux/powerpc/ppc64/13.0/32bit-userland
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-ppc64-32ul-2008.0
|
||||
source_subpath: default/stage3-ppc64-32ul-latest
|
||||
chost: powerpc-unknown-linux-gnu
|
||||
|
|
|
@ -4,4 +4,4 @@ version_stamp: 64ul-2008.0
|
|||
rel_type: default
|
||||
profile: default/linux/powerpc/ppc64/13.0/64bit-userland
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-ppc64-64ul-2008.0
|
||||
source_subpath: default/stage3-ppc64-64ul-latest
|
||||
|
|
|
@ -5,3 +5,4 @@ rel_type: default
|
|||
profile: default/linux/sh/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-sh4-2008.0
|
||||
update_seed: yes
|
||||
|
|
|
@ -5,3 +5,4 @@ rel_type: default
|
|||
profile: default/linux/sh/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-sh4a-2008.0
|
||||
update_seed: yes
|
||||
|
|
|
@ -16,7 +16,7 @@ livecd/gk_mainargs: --firmware-files=/lib/firmware/ql2200_fw.bin --makeopts=-j33
|
|||
boot/kernel: gentoo
|
||||
|
||||
boot/kernel/gentoo/sources: gentoo-sources
|
||||
boot/kernel/gentoo/config: ../../../kconfig/sparc/installcd-3.3.8.config
|
||||
boot/kernel/gentoo/config: ../../../kconfig/sparc/installcd-3.8.13.config
|
||||
boot/kernel/gentoo/use:
|
||||
-*
|
||||
atm
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: multilib
|
||||
profile: default/linux/sparc/experimental/multilib
|
||||
snapshot: 2008.0
|
||||
source_subpath: multilib/stage3-sparc64-multilib-2008.0
|
||||
source_subpath: multilib/stage3-sparc64-multilib-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -4,4 +4,5 @@ target: stage1
|
|||
rel_type: default
|
||||
profile: default/linux/sparc/13.0
|
||||
snapshot: 2008.0
|
||||
source_subpath: default/stage3-sparc64-2008.0
|
||||
source_subpath: default/stage3-sparc64-latest
|
||||
update_seed: yes
|
||||
|
|
|
@ -75,11 +75,12 @@ for ARCH in $ARCHES; do
|
|||
fi
|
||||
if [ -n "${stage3_list}" ]; then
|
||||
echo -e "${header}" >"${OUT_STAGE3}"
|
||||
echo -e "${stage3_list}" |awk '{print $3}' |grep "$latest_stage3_date" >>${OUT_STAGE3}
|
||||
# In the new variant preserve code there is a better way to do this
|
||||
#echo -e "${stage3_list}" |awk '{print $3}' |grep "$latest_stage3_date" >>${OUT_STAGE3}
|
||||
rm -f current-stage3
|
||||
# The "latest stage3" concept doesn't apply to the arm variants
|
||||
# The "latest stage3" concept doesn't apply to the arm/hppa/s390/sh variants
|
||||
# that are pushed on different days of the week.
|
||||
if [[ ! $(echo ${outdir} | grep arm) ]]; then
|
||||
if [[ ! $(echo ${outdir} | egrep 'arm|hppa|ppc|s390|sh') ]]; then
|
||||
ln -sf "$latest_stage3_date" current-stage3
|
||||
fi
|
||||
fi
|
||||
|
@ -88,11 +89,11 @@ for ARCH in $ARCHES; do
|
|||
variants="$(find 20* \( -iname '*.iso' -o -iname '*.tar.bz2' \) -printf '%f\n' |sed -e 's,-20[012][0-9]\{5\}.*,,g' -r | sort | uniq)"
|
||||
echo -n '' >"${tmpdir}"/.keep.${ARCH}.txt
|
||||
for v in $variants ; do
|
||||
#date_variant=$(find 20* -iname "${v}*" \( -name '*.tar.bz2' -o -iname '*.iso' \) -printf '%h\n' | sed -e "s,.*/$a/autobuilds/,,g" -e 's,/.*,,g' |sort -n | tail -n1 )
|
||||
variant_path=$(find 20* -iname "${v}-*" \( -name '*.tar.bz2' -o -iname '*.iso' \) -print | sed -e "s,.*/$a/autobuilds/,,g" | sort -k1,1 -t/ | tail -n1 )
|
||||
variant_path=$(find 20* -iname "${v}-20*" \( -name '*.tar.bz2' -o -iname '*.iso' \) -print | sed -e "s,.*/$a/autobuilds/,,g" | sort -k1,1 -t/ | tail -n1 )
|
||||
f="latest-${v}.txt"
|
||||
echo -e "${header}" >"${f}"
|
||||
echo -e "${variant_path}" >>${f}
|
||||
echo -e "${variant_path}" >>${OUT_STAGE3}
|
||||
rm -f "current-$v"
|
||||
ln -sf "${variant_path%/*}" "current-$v"
|
||||
echo "${variant_path}" | sed -e 's,/.*,,g' -e 's,^,/,g' -e 's,$,$,g' >>"${tmpdir}"/.keep.${ARCH}.txt
|
||||
|
|
2
tools-uclibc/.gitignore
vendored
Normal file
2
tools-uclibc/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
*log
|
||||
*err
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Exec=abiword-2.8
|
||||
Icon=abiword_48
|
||||
Exec=abiword %U
|
||||
Icon=abiword
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base;
|
||||
|
|
|
@ -14,6 +14,8 @@ gpasswd -a gentoo cdrw
|
|||
gpasswd -a gentoo usb
|
||||
gpasswd -a gentoo games
|
||||
|
||||
gpasswd -a portage wheel
|
||||
|
||||
echo gentoo:gentoo | chpasswd
|
||||
|
||||
groupadd -g 9995 graudit
|
||||
|
|
1
tools-uclibc/desktop/portage/env/cups-filters.conf
vendored
Normal file
1
tools-uclibc/desktop/portage/env/cups-filters.conf
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
MAKEOPTS="-j1"
|
1
tools-uclibc/desktop/portage/env/gdk-pixbuf.conf
vendored
Normal file
1
tools-uclibc/desktop/portage/env/gdk-pixbuf.conf
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
MAKEOPTS="-j1"
|
1
tools-uclibc/desktop/portage/env/pakchois.conf
vendored
Normal file
1
tools-uclibc/desktop/portage/env/pakchois.conf
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
CFLAGS="-lintl"
|
1
tools-uclibc/desktop/portage/env/pygobject.conf
vendored
Normal file
1
tools-uclibc/desktop/portage/env/pygobject.conf
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
MAKEOPTS="-j1"
|
|
@ -1,7 +1,7 @@
|
|||
CFLAGS="-O2 -fstack-check -pipe"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
CHOST="x86_64-gentoo-linux-uclibc"
|
||||
MAKEOPTS="-j9"
|
||||
MAKEOPTS="-j17"
|
||||
|
||||
USE_BASE="bindist mmx mmxext smp sse sse2 ssse3 static-libs -savedconfig"
|
||||
USE_GCC="graphite objc objc++ objc-gc gtk gtk3 X"
|
||||
|
@ -9,5 +9,7 @@ USE="${USE_BASE} ${USE_GCC}"
|
|||
|
||||
source "/var/lib/layman/make.conf"
|
||||
|
||||
SYNC="rsync://192.168.3.1/portage"
|
||||
GENTOO_MIRRORS="ftp://192.168.3.1/pub/gentoo"
|
||||
PORTDIR="/usr/portage"
|
||||
|
||||
SYNC="rsync://192.168.100.1/portage"
|
||||
GENTOO_MIRRORS="ftp://192.168.100.1/pub/gentoo"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CFLAGS="-fstack-check -O2 -pipe"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
CHOST="x86_64-gentoo-linux-uclibc"
|
||||
MAKEOPTS="-j9"
|
||||
MAKEOPTS="-j17"
|
||||
|
||||
USE_BASE="bindist mmx mmxext smp sse sse2 ssse3 static-libs -savedconfig"
|
||||
USE_GCC="graphite objc objc++ objc-gc gtk gtk3 qt4 X"
|
||||
|
@ -9,12 +9,12 @@ USE_ENC="gmp gnutls pkcs11 X509"
|
|||
USE_ACL="acl caps"
|
||||
USE_DBS="berkdb gdbm sqlite"
|
||||
USE_CMP="bzip2 lzma lzo minizip"
|
||||
USE_LANG="guile networking perl python ruby tcl tk threads"
|
||||
USE_LANG="guile -llvm networking perl python ruby tcl tk threads"
|
||||
USE_UDEV="gudev hwdb keymap kmod"
|
||||
USE_VCS="git"
|
||||
USE_CHAR="fontforge icu idn"
|
||||
|
||||
USE_SERVERS="cups dbus sasl mbox"
|
||||
USE_SERVERS="-ads -client dbus ldap sasl mbox winbind"
|
||||
USE_PAX="xtpax -ptpax"
|
||||
|
||||
USE_AUDIO="openal"
|
||||
|
@ -36,9 +36,11 @@ USE="${USE_BASE} ${USE_GCC} ${USE_ENC} ${USE_ACL} ${USE_DBS} ${USE_CMP} ${USE_LA
|
|||
XFCE_PLUGINS="trash menu logout"
|
||||
INPUT_DEVICES="acecad aiptek elographics evdev fpit hyperpen joystick keyboard mouse mutouch penmount tslib void"
|
||||
VIDEO_CARDS="apm ark ast chips cirrus epson fbdev glint i128 i740 intel mach64 mga modesetting nouveau nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa"
|
||||
LINGUAS="en"
|
||||
LINGUAS="af af_ZA ak am ar ar_SA ar_SY as as_IN ast az be be_BY bg bg_BG bn bn_BD bn_IN bo br brx bs ca ca_ES ca_XV ca@valencia crh cs cs_CZ csb cy da de de_DE de_FR dgo dz ee el el_GR en en_CA en_GB en_US en_ZA eo es es_AR es_CL es_CO es_CR es_ES es_LA es_MX es_VE et et_EE eu eu_ES fa fa_IR fi fi_FI fil fo fr fr_CA fr_FR fy fy_NL ga ga_IE gd gl gu gu_IN he he_IL hi hi_IN hne hr hsb ht hu hu_HU hy hy_AM ia id id_ID is it it_IT ja ja_JP jv ka ka_GE kk km kn kn_IN ko ko_KR kok ks ku ky la lb lg lo lt lt_LT lv lv_LV mai me mk ml ml_IN mn mni mr mr_IN ms ms_MY mt my nan nb nb_NO nds ne nl nl_BE nl_NL nn nn_NO no nr ns nso oc om or or_IN pa pa_IN pap pl pl_PL ps pt pt_BR pt_PT rm ro ro_RO ru ru_RU rw sa_IN sat sco sd se sh sh_YU son si si_LK sk sk_SK sl sl_SI sq sr sr@ijekavian sr@ijekavianlatin sr@latin sr@Latn sr_BA sr_CS sr_RS sr_RS@cyrillic sr_RS@latin ss st sv sv_SE sw sw_TZ ta ta_IN ta_LK te te_IN tg tg_TJ th th_TH ti ti_ER tk tl tn tr ts tt ug uk uk_UA ur ur_IN ur_PK uz uz@cyrillic ve vi vi_VN wa xh yi zh zh_CN zh_HK zh_TW zu"
|
||||
|
||||
source "/var/lib/layman/make.conf"
|
||||
|
||||
SYNC="rsync://192.168.3.1/portage"
|
||||
GENTOO_MIRRORS="ftp://192.168.3.1/pub/gentoo"
|
||||
PORTDIR="/usr/portage"
|
||||
|
||||
SYNC="rsync://192.168.100.1/portage"
|
||||
GENTOO_MIRRORS="ftp://192.168.100.1/pub/gentoo"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
CFLAGS="-fstack-check -O2 -pipe"
|
||||
CXXFLAGS="${CFLAGS}"
|
||||
CHOST="x86_64-gentoo-linux-uclibc"
|
||||
MAKEOPTS="-j9"
|
||||
MAKEOPTS="-j17"
|
||||
|
||||
USE_BASE="bindist mmx mmxext smp sse sse2 ssse3 static-libs -savedconfig"
|
||||
USE_GCC="graphite objc objc++ objc-gc gtk gtk3 qt4 X"
|
||||
|
@ -9,12 +9,12 @@ USE_ENC="gmp gnutls pkcs11 X509"
|
|||
USE_ACL="acl caps"
|
||||
USE_DBS="berkdb gdbm sqlite"
|
||||
USE_CMP="bzip2 lzma lzo minizip"
|
||||
USE_LANG="guile networking perl python ruby tcl tk threads"
|
||||
USE_LANG="guile -llvm networking perl python ruby tcl tk threads"
|
||||
USE_UDEV="gudev hwdb keymap kmod"
|
||||
USE_VCS="git"
|
||||
USE_CHAR="fontforge icu idn"
|
||||
|
||||
USE_SERVERS="avahi cups dbus sasl mbox zeroconf"
|
||||
USE_SERVERS="ads avahi cups dbus ldap sasl mbox winbind zeroconf"
|
||||
USE_PAX="xtpax -ptpax"
|
||||
|
||||
USE_AUDIO="openal"
|
||||
|
@ -36,9 +36,11 @@ USE="${USE_BASE} ${USE_GCC} ${USE_ENC} ${USE_ACL} ${USE_DBS} ${USE_CMP} ${USE_LA
|
|||
XFCE_PLUGINS="trash menu logout"
|
||||
INPUT_DEVICES="acecad aiptek elographics evdev fpit hyperpen joystick keyboard mouse mutouch penmount synaptics tslib void wacom"
|
||||
VIDEO_CARDS="apm ark ast chips cirrus epson fbdev glint i128 i740 intel mach64 mga modesetting nouveau nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa"
|
||||
LINGUAS="en"
|
||||
LINGUAS="af af_ZA ak am ar ar_SA ar_SY as as_IN ast az be be_BY bg bg_BG bn bn_BD bn_IN bo br brx bs ca ca_ES ca_XV ca@valencia crh cs cs_CZ csb cy da de de_DE de_FR dgo dz ee el el_GR en en_CA en_GB en_US en_ZA eo es es_AR es_CL es_CO es_CR es_ES es_LA es_MX es_VE et et_EE eu eu_ES fa fa_IR fi fi_FI fil fo fr fr_CA fr_FR fy fy_NL ga ga_IE gd gl gu gu_IN he he_IL hi hi_IN hne hr hsb ht hu hu_HU hy hy_AM ia id id_ID is it it_IT ja ja_JP jv ka ka_GE kk km kn kn_IN ko ko_KR kok ks ku ky la lb lg lo lt lt_LT lv lv_LV mai me mk ml ml_IN mn mni mr mr_IN ms ms_MY mt my nan nb nb_NO nds ne nl nl_BE nl_NL nn nn_NO no nr ns nso oc om or or_IN pa pa_IN pap pl pl_PL ps pt pt_BR pt_PT rm ro ro_RO ru ru_RU rw sa_IN sat sco sd se sh sh_YU son si si_LK sk sk_SK sl sl_SI sq sr sr@ijekavian sr@ijekavianlatin sr@latin sr@Latn sr_BA sr_CS sr_RS sr_RS@cyrillic sr_RS@latin ss st sv sv_SE sw sw_TZ ta ta_IN ta_LK te te_IN tg tg_TJ th th_TH ti ti_ER tk tl tn tr ts tt ug uk uk_UA ur ur_IN ur_PK uz uz@cyrillic ve vi vi_VN wa xh yi zh zh_CN zh_HK zh_TW zu"
|
||||
|
||||
source "/var/lib/layman/make.conf"
|
||||
|
||||
SYNC="rsync://192.168.3.1/portage"
|
||||
GENTOO_MIRRORS="ftp://192.168.3.1/pub/gentoo"
|
||||
PORTDIR="/usr/portage"
|
||||
|
||||
SYNC="rsync://192.168.100.1/portage"
|
||||
GENTOO_MIRRORS="ftp://192.168.100.1/pub/gentoo"
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
=perl-core/ExtUtils-Manifest-1.630.0 ~amd64
|
|
@ -1,6 +1,10 @@
|
|||
app-crypt/pinentry pinentry.conf
|
||||
dev-libs/pakchois pakchois.conf
|
||||
dev-python/pygobject pygobject.conf
|
||||
dev-vcs/git git.conf
|
||||
media-gfx/fontforge fontforge.conf
|
||||
media-libs/libquicktime libquicktime.conf
|
||||
media-video/ffmpeg ffmpeg.conf
|
||||
net-print/cups-filters cups-filters.conf
|
||||
sys-apps/coreutils coreutils.conf
|
||||
x11-libs/gdk-pixbuf gdk-pixbuf.conf
|
||||
|
|
1
tools-uclibc/desktop/portage/package.mask/epiphany
Normal file
1
tools-uclibc/desktop/portage/package.mask/epiphany
Normal file
|
@ -0,0 +1 @@
|
|||
>www-client/epiphany-2.30.6-r1
|
|
@ -0,0 +1 @@
|
|||
>gnome-extra/gnome-screensaver-2.30.2-r1
|
|
@ -1 +0,0 @@
|
|||
=net-misc/openntpd-20080406
|
|
@ -1,2 +0,0 @@
|
|||
=dev-lang/python-2.7.4*
|
||||
=dev-lang/python-2.7.5*
|
1
tools-uclibc/desktop/portage/package.mask/slim
Normal file
1
tools-uclibc/desktop/portage/package.mask/slim
Normal file
|
@ -0,0 +1 @@
|
|||
>x11-misc/slim-1.3.5-r4
|
|
@ -1 +0,0 @@
|
|||
>app-admin/syslog-ng-3.2.5
|
1
tools-uclibc/desktop/portage/package.mask/webkit-gtk
Normal file
1
tools-uclibc/desktop/portage/package.mask/webkit-gtk
Normal file
|
@ -0,0 +1 @@
|
|||
>net-libs/webkit-gtk-1.8.3-r300
|
1
tools-uclibc/desktop/portage/package.use/DirectFB
Normal file
1
tools-uclibc/desktop/portage/package.use/DirectFB
Normal file
|
@ -0,0 +1 @@
|
|||
dev-libs/DirectFB -sdl
|
1
tools-uclibc/desktop/portage/package.use/busybox
Normal file
1
tools-uclibc/desktop/portage/package.use/busybox
Normal file
|
@ -0,0 +1 @@
|
|||
sys-apps/busybox -static
|
7
tools-uclibc/desktop/portage/repos.conf/gentoo.conf
Normal file
7
tools-uclibc/desktop/portage/repos.conf/gentoo.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
[DEFAULT]
|
||||
main-repo = gentoo
|
||||
|
||||
[gentoo]
|
||||
location = /usr/portage
|
||||
sync-type = rsync
|
||||
sync-uri = rsync://rsync.gentoo.org/gentoo-portage
|
|
@ -38,7 +38,7 @@ populate_etc() {
|
|||
rm -f "${ROOTFS}"/etc/portage/make.conf.catalyst
|
||||
cp -f portage/make.conf.1 "${ROOTFS}"/etc/portage/make.conf
|
||||
|
||||
for d in env package.accept_keywords package.mask package.use profile; do
|
||||
for d in env package.accept_keywords package.mask package.use profile repos.conf; do
|
||||
[[ -a portage/"${d}" ]] && cp -af portage/${d} "${ROOTFS}"/etc/portage
|
||||
done
|
||||
cp -af portage/package.env "${ROOTFS}"/etc/portage
|
||||
|
@ -52,7 +52,7 @@ rebuild_toolchain() {
|
|||
|
||||
rebuild_world() {
|
||||
cp -f portage/make.conf.2 "${ROOTFS}"/etc/portage/make.conf
|
||||
cp -f world "${ROOTFS}"/var/lib/portage/world
|
||||
cp -f world.1 "${ROOTFS}"/var/lib/portage/world
|
||||
cp -f rebuild.sh "${ROOTFS}"/tmp/
|
||||
chroot "${ROOTFS}"/ /tmp/rebuild.sh
|
||||
rm -f "${ROOTFS}"/tmp/rebuild.sh
|
||||
|
@ -61,6 +61,8 @@ rebuild_world() {
|
|||
|
||||
update_world() {
|
||||
cp -f portage/make.conf.3 "${ROOTFS}"/etc/portage/make.conf
|
||||
cp -f world.2 "${ROOTFS}"/var/lib/portage/world
|
||||
|
||||
cp -f update.sh "${ROOTFS}"/tmp/
|
||||
chroot "${ROOTFS}"/ /tmp/update.sh
|
||||
rm -f "${ROOTFS}"/tmp/update.sh
|
||||
|
@ -101,33 +103,48 @@ setup_initrc() {
|
|||
}
|
||||
|
||||
setup_usergroups() {
|
||||
local DCONF_LOCAL="http://dev.gentoo.org/~blueness/lilblue/user"
|
||||
|
||||
cp -f passwd.sh "${ROOTFS}"/tmp/
|
||||
chroot "${ROOTFS}"/ /tmp/passwd.sh
|
||||
rm -f "${ROOTFS}"/tmp/passwd.sh
|
||||
|
||||
rm -rf "${ROOTFS}"/etc/skel
|
||||
cp -a gentoo "${ROOTFS}"/etc/skel
|
||||
mkdir "${ROOTFS}"/etc/skel/{Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos,.ssh}
|
||||
mkdir -p "${ROOTFS}"/etc/skel/{Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos,.ssh,.cache/dconf,.config/dconf}
|
||||
chmod 700 "${ROOTFS}"/etc/skel/.ssh
|
||||
wget -O "${ROOTFS}"/etc/skel/.config/dconf/user "${DCONF_LOCAL}"
|
||||
wget -O "${ROOTFS}"/etc/skel/.cache/dconf/user "${DCONF_LOCAL}"
|
||||
|
||||
rm -rf "${ROOTFS}"/home/gentoo
|
||||
cp -a gentoo "${ROOTFS}"/home/gentoo
|
||||
mkdir "${ROOTFS}"/home/gentoo/{Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos,.ssh}
|
||||
mkdir -p "${ROOTFS}"/home/gentoo/{Desktop,Documents,Downloads,Music,Pictures,Public,Templates,Videos,.ssh,.cache/dconf,.config/dconf}
|
||||
chmod 700 "${ROOTFS}"/home/gentoo/.ssh
|
||||
wget -O "${ROOTFS}"/home/gentoo/.config/dconf/user "${DCONF_LOCAL}"
|
||||
wget -O "${ROOTFS}"/home/gentoo/.cache/dconf/user "${DCONF_LOCAL}"
|
||||
|
||||
chroot "${ROOTFS}"/ chown -R gentoo:gentoo /home/gentoo
|
||||
sed -i 's/# \(%wheel.*NOPASSWD\)/\1/' "${ROOTFS}"/etc/sudoers
|
||||
}
|
||||
|
||||
setup_confs() {
|
||||
local IMAGE="http://dev.gentoo.org/~blueness/lilblue/gentoo1600x1200.jpg"
|
||||
|
||||
sed -i 's/^\(DISPLAYMANAGER="\)xdm/\1slim/' "${ROOTFS}"/etc/conf.d/xdm
|
||||
sed -i 's/^\(login.*\)/# \1/' "${ROOTFS}"/etc/slim.conf
|
||||
sed -i '/# login_cmd.*Xsession/ a\login_cmd exec /bin/bash -login ~/.xinitrc' "${ROOTFS}"/etc/slim.conf
|
||||
wget -O "${ROOTFS}"/usr/share/slim/themes/default/background.jpg http://www.gentoo.org/images/backgrounds/gentoo1600x1200.jpg
|
||||
#sed -i 's/^\(sessiondir.*\)/# \1/' "${ROOTFS}"/etc/slim.conf
|
||||
#sed -i '/# sessiondir.*/ a\sessiondir /etc/X11/Sessions' "${ROOTFS}"/etc/slim.conf
|
||||
|
||||
wget -O "${ROOTFS}"/usr/share/slim/themes/default/background.jpg "${IMAGE}"
|
||||
wget -O "${ROOTFS}"/usr/share/pixmaps/backgrounds/gnome/background-default.jpg "${IMAGE}"
|
||||
|
||||
sed -i '/^SYNC/d' "${ROOTFS}"/etc/portage/make.conf
|
||||
sed -i '/^GENTOO_MIRRORS/d' "${ROOTFS}"/etc/portage/make.conf
|
||||
sed -i 's/^MAKEOPTS/#MAKEOPTS/' "${ROOTFS}"/etc/portage/make.conf
|
||||
|
||||
# In kernels 3.9 and above, we must disallow-other-stacks because of SO_REUSEPORT
|
||||
sed -i 's/^#\(disallow-other-stacks=\)no/\1yes/g' "${ROOTFS}"/etc/avahi/avahi-daemon.conf
|
||||
}
|
||||
|
||||
cleanup_dirs() {
|
||||
|
@ -143,6 +160,9 @@ unmount_dirs() {
|
|||
umount "${ROOTFS}"/dev/
|
||||
umount "${ROOTFS}"/proc/
|
||||
umount "${ROOTFS}"/usr/portage/
|
||||
|
||||
mkdir "${ROOTFS}"/usr/portage/profiles/
|
||||
echo "gentoo" >> "${ROOTFS}"/usr/portage/profiles/repo_name
|
||||
}
|
||||
|
||||
bundle_it() {
|
||||
|
|
|
@ -2,4 +2,7 @@
|
|||
|
||||
source /etc/profile
|
||||
env-update
|
||||
#hacky - for some reason cairo fails to rebuild
|
||||
#unless binutils is rebuilt first.
|
||||
emerge -q binutils
|
||||
emerge -uvNDq world
|
||||
|
|
75
tools-uclibc/desktop/world.1
Normal file
75
tools-uclibc/desktop/world.1
Normal file
|
@ -0,0 +1,75 @@
|
|||
app-admin/sudo
|
||||
app-admin/syslog-ng
|
||||
app-arch/file-roller
|
||||
app-editors/gedit
|
||||
app-editors/nano
|
||||
app-editors/vim
|
||||
app-office/abiword
|
||||
app-portage/gentoolkit
|
||||
app-portage/layman
|
||||
app-text/evince
|
||||
app-text/tree
|
||||
dev-lang/python
|
||||
dev-lang/tcl
|
||||
dev-libs/gmp
|
||||
dev-libs/libiconv
|
||||
dev-libs/mpfr
|
||||
dev-util/strace
|
||||
dev-vcs/git
|
||||
gnome-extra/gcalctool
|
||||
gnome-extra/gnome-games
|
||||
gnome-extra/gnome-screensaver
|
||||
gnome-extra/gnome-system-monitor
|
||||
mail-client/claws-mail
|
||||
mail-client/mailx
|
||||
mail-mta/postfix
|
||||
media-gfx/gimp
|
||||
media-sound/alsa-utils
|
||||
media-video/smplayer
|
||||
media-video/totem
|
||||
net-analyzer/tcpdump
|
||||
net-dns/avahi
|
||||
net-fs/samba
|
||||
net-ftp/lftp
|
||||
net-irc/hexchat
|
||||
net-mail/dovecot
|
||||
net-misc/openntpd
|
||||
net-misc/rdate
|
||||
net-misc/tor
|
||||
net-misc/vinagre
|
||||
net-p2p/transmission
|
||||
net-wireless/wpa_supplicant
|
||||
sys-apps/dbus
|
||||
sys-apps/elfix
|
||||
sys-apps/gradm
|
||||
sys-apps/less
|
||||
sys-apps/paxctl
|
||||
sys-apps/pciutils
|
||||
sys-boot/lilo
|
||||
sys-devel/autoconf
|
||||
sys-devel/automake
|
||||
sys-devel/gcc
|
||||
sys-devel/gdb
|
||||
sys-fs/cryptsetup
|
||||
sys-kernel/genkernel
|
||||
sys-kernel/linux-firmware
|
||||
sys-libs/cracklib
|
||||
sys-libs/db
|
||||
sys-libs/gdbm
|
||||
sys-libs/uclibc
|
||||
sys-process/lsof
|
||||
virtual/libiconv
|
||||
virtual/libintl
|
||||
virtual/package-manager
|
||||
www-client/epiphany
|
||||
x11-base/xorg-server
|
||||
x11-libs/gksu
|
||||
x11-misc/slim
|
||||
x11-terms/gnome-terminal
|
||||
x11-terms/xterm
|
||||
xfce-base/xfce4-appfinder
|
||||
xfce-base/xfce4-meta
|
||||
xfce-extra/thunar-archive-plugin
|
||||
xfce-extra/thunar-shares-plugin
|
||||
xfce-extra/xfce4-mixer
|
||||
xfce-extra/xfce4-volumed
|
|
@ -1 +0,0 @@
|
|||
=sys-fs/eudev-1.1 ~amd64
|
|
@ -1 +0,0 @@
|
|||
=sys-libs/uclibc-0.9.33.2-r4 ~amd64
|
|
@ -1,2 +0,0 @@
|
|||
=dev-lang/python-2.7.4*
|
||||
=dev-lang/python-2.7.5*
|
2
tools-uclibc/portage.amd64.hardened/package.use/eudev
Normal file
2
tools-uclibc/portage.amd64.hardened/package.use/eudev
Normal file
|
@ -0,0 +1,2 @@
|
|||
sys-fs/eudev keymap hwdb
|
||||
sys-apps/hwids udev
|
|
@ -0,0 +1,65 @@
|
|||
From f22cca4722fa66e424562e69f4afa2bca0af871d Mon Sep 17 00:00:00 2001
|
||||
From: "Anthony G. Basile" <blueness@gentoo.org>
|
||||
Date: Sun, 28 Jul 2013 09:08:34 -0400
|
||||
Subject: [PATCH] libc: add isfdtype()
|
||||
|
||||
isfdtype(int fd, int fdtype) check whether a file descriptor fd is
|
||||
of type fdtype, where the types are defined in stat(2). It is
|
||||
supported in glibc and BSD, and used by utilities such as acpid.
|
||||
|
||||
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
libc/misc/file/isfdtype.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 libc/misc/file/isfdtype.c
|
||||
|
||||
diff --git a/libc/misc/file/isfdtype.c b/libc/misc/file/isfdtype.c
|
||||
new file mode 100644
|
||||
index 0000000..4d9199b
|
||||
--- /dev/null
|
||||
+++ libc/misc/file/isfdtype.c
|
||||
@@ -0,0 +1,40 @@
|
||||
+/* Determine whether descriptor has given property.
|
||||
+ Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library 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
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/types.h>
|
||||
+#ifdef __UCLIBC_HAS_LFS__
|
||||
+# include <_lfs_64.h>
|
||||
+#else
|
||||
+# define stat64 stat
|
||||
+# define fstat64 fstat
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+isfdtype (int fildes, int fdtype)
|
||||
+{
|
||||
+ struct stat64 st;
|
||||
+ int save_error = errno;
|
||||
+ int result = fstat64 (fildes, &st);
|
||||
+ __set_errno (save_error);
|
||||
+ if (result)
|
||||
+ return result;
|
||||
+ return (st.st_mode & S_IFMT) == (mode_t) fdtype;
|
||||
+}
|
||||
--
|
||||
1.8.3.2.733.gf8abaeb
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
From 342a3d861fde5651ee53486addbacddcec6a0a58 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <natanael.copa@gmail.com>
|
||||
Date: Sat, 04 Aug 2012 17:32:45 +0000
|
||||
Subject: pread/pwrite: backport fix
|
||||
|
||||
pread/pwrite syscalls has been renamed to pread64/pwrite in 2.6 kernel.
|
||||
|
||||
There was a fallback function using lseek for kernels who did not have
|
||||
this syscall (pre 2.1.60). This is broken in many ways.
|
||||
|
||||
uclibc have been using the broken fallback due to they forgot to rename
|
||||
pread syscall.
|
||||
|
||||
This got detected with git-1.7.11 which introduced threaded index-pack
|
||||
which broke in similar ways a windows (msys).
|
||||
|
||||
This issue in uclibc have been reported upstream and fixed in git master
|
||||
so this patch does not need to be upstreamed. It might be an idea to
|
||||
backport it properly for 0.9.33 branch though.
|
||||
|
||||
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
|
||||
index 88e6957..baf8691 100644
|
||||
--- a/libc/sysdeps/linux/common/pread_write.c
|
||||
+++ b/libc/sysdeps/linux/common/pread_write.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <endian.h>
|
||||
+#include <sysdep-cancel.h>
|
||||
|
||||
extern __typeof(pread) __libc_pread;
|
||||
extern __typeof(pwrite) __libc_pwrite;
|
||||
@@ -27,15 +28,17 @@ extern __typeof(pwrite64) __libc_pwrite64;
|
||||
|
||||
#include <bits/kernel_types.h>
|
||||
|
||||
-#ifdef __NR_pread
|
||||
-
|
||||
-# define __NR___syscall_pread __NR_pread
|
||||
+# define __NR___syscall_pread __NR_pread64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
+
|
||||
}
|
||||
weak_alias(__libc_pread,pread)
|
||||
|
||||
@@ -44,22 +47,24 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pread64,pread64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
|
||||
-#endif /* __NR_pread */
|
||||
-
|
||||
-#ifdef __NR_pwrite
|
||||
-
|
||||
-# define __NR___syscall_pwrite __NR_pwrite
|
||||
+# define __NR___syscall_pwrite __NR_pwrite64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pwrite,pwrite)
|
||||
|
||||
@@ -68,120 +73,10 @@ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
-}
|
||||
-weak_alias(__libc_pwrite64,pwrite64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* __NR_pwrite */
|
||||
-
|
||||
-#if ! defined __NR_pread || ! defined __NR_pwrite
|
||||
-
|
||||
-static ssize_t __fake_pread_write(int fd, void *buf,
|
||||
- size_t count, off_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. If this fails we
|
||||
- * have to return this as an error. */
|
||||
- save_errno = errno;
|
||||
- if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
|
||||
- {
|
||||
- if (result == -1)
|
||||
- __set_errno(save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno(save_errno);
|
||||
- return(result);
|
||||
-}
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-
|
||||
-static ssize_t __fake_pread_write64(int fd, void *buf,
|
||||
- size_t count, off64_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off64_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. */
|
||||
- save_errno = errno;
|
||||
- if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
|
||||
- if (result == -1)
|
||||
- __set_errno (save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno (save_errno);
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
return result;
|
||||
}
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
|
||||
-
|
||||
-#ifndef __NR_pread
|
||||
-ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- return __fake_pread_write(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread,pread)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread64,pread64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pread */
|
||||
-
|
||||
-#ifndef __NR_pwrite
|
||||
-ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- /* we won't actually be modifying the buffer,
|
||||
- *just cast it to get rid of warnings */
|
||||
- return __fake_pread_write(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
-weak_alias(__libc_pwrite,pwrite)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
weak_alias(__libc_pwrite64,pwrite64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pwrite */
|
||||
--
|
||||
cgit v0.9.1
|
|
@ -128,7 +128,7 @@ UCLIBC_BSD_SPECIFIC=y
|
|||
UCLIBC_HAS_BSD_ERR=y
|
||||
# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set
|
||||
# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
|
||||
# UCLIBC_NTP_LEGACY is not set
|
||||
UCLIBC_NTP_LEGACY=y
|
||||
# UCLIBC_SV4_DEPRECATED is not set
|
||||
UCLIBC_HAS_REALTIME=y
|
||||
UCLIBC_HAS_ADVANCED_REALTIME=y
|
||||
|
@ -246,7 +246,7 @@ DOSTRIP=y
|
|||
# SUPPORT_LD_DEBUG is not set
|
||||
# SUPPORT_LD_DEBUG_EARLY is not set
|
||||
# UCLIBC_MALLOC_DEBUGGING is not set
|
||||
# UCLIBC_HAS_BACKTRACE is not set
|
||||
UCLIBC_HAS_BACKTRACE=y
|
||||
WARNINGS="-Wall"
|
||||
# EXTRA_WARNINGS is not set
|
||||
# DOMULTI is not set
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
=sys-fs/eudev-1.1 ~amd64
|
|
@ -1 +0,0 @@
|
|||
=sys-libs/uclibc-0.9.33.2-r4 ~amd64
|
|
@ -1,2 +0,0 @@
|
|||
=dev-lang/python-2.7.4*
|
||||
=dev-lang/python-2.7.5*
|
2
tools-uclibc/portage.amd64.vanilla/package.use/eudev
Normal file
2
tools-uclibc/portage.amd64.vanilla/package.use/eudev
Normal file
|
@ -0,0 +1,2 @@
|
|||
sys-fs/eudev keymap hwdb
|
||||
sys-apps/hwids udev
|
|
@ -0,0 +1,65 @@
|
|||
From f22cca4722fa66e424562e69f4afa2bca0af871d Mon Sep 17 00:00:00 2001
|
||||
From: "Anthony G. Basile" <blueness@gentoo.org>
|
||||
Date: Sun, 28 Jul 2013 09:08:34 -0400
|
||||
Subject: [PATCH] libc: add isfdtype()
|
||||
|
||||
isfdtype(int fd, int fdtype) check whether a file descriptor fd is
|
||||
of type fdtype, where the types are defined in stat(2). It is
|
||||
supported in glibc and BSD, and used by utilities such as acpid.
|
||||
|
||||
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
libc/misc/file/isfdtype.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 libc/misc/file/isfdtype.c
|
||||
|
||||
diff --git a/libc/misc/file/isfdtype.c b/libc/misc/file/isfdtype.c
|
||||
new file mode 100644
|
||||
index 0000000..4d9199b
|
||||
--- /dev/null
|
||||
+++ libc/misc/file/isfdtype.c
|
||||
@@ -0,0 +1,40 @@
|
||||
+/* Determine whether descriptor has given property.
|
||||
+ Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library 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
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/types.h>
|
||||
+#ifdef __UCLIBC_HAS_LFS__
|
||||
+# include <_lfs_64.h>
|
||||
+#else
|
||||
+# define stat64 stat
|
||||
+# define fstat64 fstat
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+isfdtype (int fildes, int fdtype)
|
||||
+{
|
||||
+ struct stat64 st;
|
||||
+ int save_error = errno;
|
||||
+ int result = fstat64 (fildes, &st);
|
||||
+ __set_errno (save_error);
|
||||
+ if (result)
|
||||
+ return result;
|
||||
+ return (st.st_mode & S_IFMT) == (mode_t) fdtype;
|
||||
+}
|
||||
--
|
||||
1.8.3.2.733.gf8abaeb
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
From 342a3d861fde5651ee53486addbacddcec6a0a58 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <natanael.copa@gmail.com>
|
||||
Date: Sat, 04 Aug 2012 17:32:45 +0000
|
||||
Subject: pread/pwrite: backport fix
|
||||
|
||||
pread/pwrite syscalls has been renamed to pread64/pwrite in 2.6 kernel.
|
||||
|
||||
There was a fallback function using lseek for kernels who did not have
|
||||
this syscall (pre 2.1.60). This is broken in many ways.
|
||||
|
||||
uclibc have been using the broken fallback due to they forgot to rename
|
||||
pread syscall.
|
||||
|
||||
This got detected with git-1.7.11 which introduced threaded index-pack
|
||||
which broke in similar ways a windows (msys).
|
||||
|
||||
This issue in uclibc have been reported upstream and fixed in git master
|
||||
so this patch does not need to be upstreamed. It might be an idea to
|
||||
backport it properly for 0.9.33 branch though.
|
||||
|
||||
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
|
||||
index 88e6957..baf8691 100644
|
||||
--- a/libc/sysdeps/linux/common/pread_write.c
|
||||
+++ b/libc/sysdeps/linux/common/pread_write.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <endian.h>
|
||||
+#include <sysdep-cancel.h>
|
||||
|
||||
extern __typeof(pread) __libc_pread;
|
||||
extern __typeof(pwrite) __libc_pwrite;
|
||||
@@ -27,15 +28,17 @@ extern __typeof(pwrite64) __libc_pwrite64;
|
||||
|
||||
#include <bits/kernel_types.h>
|
||||
|
||||
-#ifdef __NR_pread
|
||||
-
|
||||
-# define __NR___syscall_pread __NR_pread
|
||||
+# define __NR___syscall_pread __NR_pread64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
+
|
||||
}
|
||||
weak_alias(__libc_pread,pread)
|
||||
|
||||
@@ -44,22 +47,24 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pread64,pread64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
|
||||
-#endif /* __NR_pread */
|
||||
-
|
||||
-#ifdef __NR_pwrite
|
||||
-
|
||||
-# define __NR___syscall_pwrite __NR_pwrite
|
||||
+# define __NR___syscall_pwrite __NR_pwrite64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pwrite,pwrite)
|
||||
|
||||
@@ -68,120 +73,10 @@ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
-}
|
||||
-weak_alias(__libc_pwrite64,pwrite64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* __NR_pwrite */
|
||||
-
|
||||
-#if ! defined __NR_pread || ! defined __NR_pwrite
|
||||
-
|
||||
-static ssize_t __fake_pread_write(int fd, void *buf,
|
||||
- size_t count, off_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. If this fails we
|
||||
- * have to return this as an error. */
|
||||
- save_errno = errno;
|
||||
- if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
|
||||
- {
|
||||
- if (result == -1)
|
||||
- __set_errno(save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno(save_errno);
|
||||
- return(result);
|
||||
-}
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-
|
||||
-static ssize_t __fake_pread_write64(int fd, void *buf,
|
||||
- size_t count, off64_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off64_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. */
|
||||
- save_errno = errno;
|
||||
- if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
|
||||
- if (result == -1)
|
||||
- __set_errno (save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno (save_errno);
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
return result;
|
||||
}
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
|
||||
-
|
||||
-#ifndef __NR_pread
|
||||
-ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- return __fake_pread_write(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread,pread)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread64,pread64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pread */
|
||||
-
|
||||
-#ifndef __NR_pwrite
|
||||
-ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- /* we won't actually be modifying the buffer,
|
||||
- *just cast it to get rid of warnings */
|
||||
- return __fake_pread_write(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
-weak_alias(__libc_pwrite,pwrite)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
weak_alias(__libc_pwrite64,pwrite64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pwrite */
|
||||
--
|
||||
cgit v0.9.1
|
|
@ -128,7 +128,7 @@ UCLIBC_BSD_SPECIFIC=y
|
|||
UCLIBC_HAS_BSD_ERR=y
|
||||
# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set
|
||||
# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
|
||||
# UCLIBC_NTP_LEGACY is not set
|
||||
UCLIBC_NTP_LEGACY=y
|
||||
# UCLIBC_SV4_DEPRECATED is not set
|
||||
UCLIBC_HAS_REALTIME=y
|
||||
UCLIBC_HAS_ADVANCED_REALTIME=y
|
||||
|
@ -246,7 +246,7 @@ DOSTRIP=y
|
|||
# SUPPORT_LD_DEBUG is not set
|
||||
# SUPPORT_LD_DEBUG_EARLY is not set
|
||||
# UCLIBC_MALLOC_DEBUGGING is not set
|
||||
# UCLIBC_HAS_BACKTRACE is not set
|
||||
UCLIBC_HAS_BACKTRACE=y
|
||||
WARNINGS="-Wall"
|
||||
# EXTRA_WARNINGS is not set
|
||||
# DOMULTI is not set
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
=sys-fs/eudev-1.1 ~arm
|
|
@ -1 +0,0 @@
|
|||
=sys-apps/sandbox-2.6 ~arm
|
|
@ -1 +0,0 @@
|
|||
=dev-lang/perl-5.12.4-r1 -build
|
|
@ -0,0 +1,59 @@
|
|||
From e118373cbb58ba5ffa5fb6670957678d5b87cdb9 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 10 Jun 2012 16:36:23 +0000
|
||||
Subject: eventfd: Implement eventfd2 and fix eventfd
|
||||
|
||||
eventfd: evntfd assumes to take two arguments instead it
|
||||
should be one evntfd expects two therefore implement both syscalls with
|
||||
correct parameters
|
||||
|
||||
Thanks Eugene Rudoy for reporting it and also providing the patch
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
diff --git a/libc/sysdeps/linux/common/eventfd.c b/libc/sysdeps/linux/common/eventfd.c
|
||||
index cc3f3f0..96597ab 100644
|
||||
--- a/libc/sysdeps/linux/common/eventfd.c
|
||||
+++ b/libc/sysdeps/linux/common/eventfd.c
|
||||
@@ -7,12 +7,24 @@
|
||||
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
|
||||
*/
|
||||
|
||||
+#include <errno.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
/*
|
||||
* eventfd()
|
||||
*/
|
||||
-#ifdef __NR_eventfd
|
||||
-_syscall2(int, eventfd, int, count, int, flags)
|
||||
+#if defined __NR_eventfd || defined __NR_eventfd2
|
||||
+int eventfd (int count, int flags)
|
||||
+{
|
||||
+#if defined __NR_eventfd2
|
||||
+ return INLINE_SYSCALL (eventfd2, 2, count, flags);
|
||||
+#elif defined __NR_eventfd
|
||||
+ if (flags != 0) {
|
||||
+ __set_errno (EINVAL);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return INLINE_SYSCALL (eventfd, 1, count);
|
||||
+#endif
|
||||
+}
|
||||
#endif
|
||||
diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
|
||||
index 3567b07..1fc2393 100644
|
||||
--- a/libc/sysdeps/linux/common/stubs.c
|
||||
+++ b/libc/sysdeps/linux/common/stubs.c
|
||||
@@ -110,7 +110,7 @@ make_stub(epoll_pwait)
|
||||
make_stub(epoll_wait)
|
||||
#endif
|
||||
|
||||
-#if !defined __NR_eventfd && defined __UCLIBC_LINUX_SPECIFIC__
|
||||
+#if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__
|
||||
make_stub(eventfd)
|
||||
#endif
|
||||
|
||||
--
|
||||
cgit v0.9.1
|
|
@ -0,0 +1,65 @@
|
|||
From f22cca4722fa66e424562e69f4afa2bca0af871d Mon Sep 17 00:00:00 2001
|
||||
From: "Anthony G. Basile" <blueness@gentoo.org>
|
||||
Date: Sun, 28 Jul 2013 09:08:34 -0400
|
||||
Subject: [PATCH] libc: add isfdtype()
|
||||
|
||||
isfdtype(int fd, int fdtype) check whether a file descriptor fd is
|
||||
of type fdtype, where the types are defined in stat(2). It is
|
||||
supported in glibc and BSD, and used by utilities such as acpid.
|
||||
|
||||
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
libc/misc/file/isfdtype.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 libc/misc/file/isfdtype.c
|
||||
|
||||
diff --git a/libc/misc/file/isfdtype.c b/libc/misc/file/isfdtype.c
|
||||
new file mode 100644
|
||||
index 0000000..4d9199b
|
||||
--- /dev/null
|
||||
+++ libc/misc/file/isfdtype.c
|
||||
@@ -0,0 +1,40 @@
|
||||
+/* Determine whether descriptor has given property.
|
||||
+ Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library 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
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/types.h>
|
||||
+#ifdef __UCLIBC_HAS_LFS__
|
||||
+# include <_lfs_64.h>
|
||||
+#else
|
||||
+# define stat64 stat
|
||||
+# define fstat64 fstat
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+isfdtype (int fildes, int fdtype)
|
||||
+{
|
||||
+ struct stat64 st;
|
||||
+ int save_error = errno;
|
||||
+ int result = fstat64 (fildes, &st);
|
||||
+ __set_errno (save_error);
|
||||
+ if (result)
|
||||
+ return result;
|
||||
+ return (st.st_mode & S_IFMT) == (mode_t) fdtype;
|
||||
+}
|
||||
--
|
||||
1.8.3.2.733.gf8abaeb
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
From 342a3d861fde5651ee53486addbacddcec6a0a58 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <natanael.copa@gmail.com>
|
||||
Date: Sat, 04 Aug 2012 17:32:45 +0000
|
||||
Subject: pread/pwrite: backport fix
|
||||
|
||||
pread/pwrite syscalls has been renamed to pread64/pwrite in 2.6 kernel.
|
||||
|
||||
There was a fallback function using lseek for kernels who did not have
|
||||
this syscall (pre 2.1.60). This is broken in many ways.
|
||||
|
||||
uclibc have been using the broken fallback due to they forgot to rename
|
||||
pread syscall.
|
||||
|
||||
This got detected with git-1.7.11 which introduced threaded index-pack
|
||||
which broke in similar ways a windows (msys).
|
||||
|
||||
This issue in uclibc have been reported upstream and fixed in git master
|
||||
so this patch does not need to be upstreamed. It might be an idea to
|
||||
backport it properly for 0.9.33 branch though.
|
||||
|
||||
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
|
||||
index 88e6957..baf8691 100644
|
||||
--- a/libc/sysdeps/linux/common/pread_write.c
|
||||
+++ b/libc/sysdeps/linux/common/pread_write.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <endian.h>
|
||||
+#include <sysdep-cancel.h>
|
||||
|
||||
extern __typeof(pread) __libc_pread;
|
||||
extern __typeof(pwrite) __libc_pwrite;
|
||||
@@ -27,15 +28,17 @@ extern __typeof(pwrite64) __libc_pwrite64;
|
||||
|
||||
#include <bits/kernel_types.h>
|
||||
|
||||
-#ifdef __NR_pread
|
||||
-
|
||||
-# define __NR___syscall_pread __NR_pread
|
||||
+# define __NR___syscall_pread __NR_pread64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
+
|
||||
}
|
||||
weak_alias(__libc_pread,pread)
|
||||
|
||||
@@ -44,22 +47,24 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pread64,pread64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
|
||||
-#endif /* __NR_pread */
|
||||
-
|
||||
-#ifdef __NR_pwrite
|
||||
-
|
||||
-# define __NR___syscall_pwrite __NR_pwrite
|
||||
+# define __NR___syscall_pwrite __NR_pwrite64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pwrite,pwrite)
|
||||
|
||||
@@ -68,120 +73,10 @@ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
-}
|
||||
-weak_alias(__libc_pwrite64,pwrite64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* __NR_pwrite */
|
||||
-
|
||||
-#if ! defined __NR_pread || ! defined __NR_pwrite
|
||||
-
|
||||
-static ssize_t __fake_pread_write(int fd, void *buf,
|
||||
- size_t count, off_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. If this fails we
|
||||
- * have to return this as an error. */
|
||||
- save_errno = errno;
|
||||
- if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
|
||||
- {
|
||||
- if (result == -1)
|
||||
- __set_errno(save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno(save_errno);
|
||||
- return(result);
|
||||
-}
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-
|
||||
-static ssize_t __fake_pread_write64(int fd, void *buf,
|
||||
- size_t count, off64_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off64_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. */
|
||||
- save_errno = errno;
|
||||
- if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
|
||||
- if (result == -1)
|
||||
- __set_errno (save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno (save_errno);
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
return result;
|
||||
}
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
|
||||
-
|
||||
-#ifndef __NR_pread
|
||||
-ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- return __fake_pread_write(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread,pread)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread64,pread64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pread */
|
||||
-
|
||||
-#ifndef __NR_pwrite
|
||||
-ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- /* we won't actually be modifying the buffer,
|
||||
- *just cast it to get rid of warnings */
|
||||
- return __fake_pread_write(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
-weak_alias(__libc_pwrite,pwrite)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
weak_alias(__libc_pwrite64,pwrite64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pwrite */
|
||||
--
|
||||
cgit v0.9.1
|
|
@ -68,8 +68,8 @@ LDSO_CACHE_SUPPORT=y
|
|||
LDSO_PRELOAD_ENV_SUPPORT=y
|
||||
LDSO_PRELOAD_FILE_SUPPORT=y
|
||||
LDSO_BASE_FILENAME="ld.so"
|
||||
# LDSO_STANDALONE_SUPPORT is not set
|
||||
# LDSO_PRELINK_SUPPORT is not set
|
||||
LDSO_STANDALONE_SUPPORT=y
|
||||
LDSO_PRELINK_SUPPORT=y
|
||||
UCLIBC_STATIC_LDCONFIG=y
|
||||
LDSO_RUNPATH=y
|
||||
LDSO_SEARCH_INTERP_PATH=y
|
||||
|
@ -122,14 +122,14 @@ UCLIBC_GRP_BUFFER_SIZE=256
|
|||
# Support various families of functions
|
||||
#
|
||||
UCLIBC_LINUX_MODULE_26=y
|
||||
UCLIBC_LINUX_MODULE_24=y
|
||||
# UCLIBC_LINUX_MODULE_24 is not set
|
||||
UCLIBC_LINUX_SPECIFIC=y
|
||||
UCLIBC_HAS_GNU_ERROR=y
|
||||
UCLIBC_BSD_SPECIFIC=y
|
||||
UCLIBC_HAS_BSD_ERR=y
|
||||
# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set
|
||||
# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
|
||||
# UCLIBC_NTP_LEGACY is not set
|
||||
UCLIBC_NTP_LEGACY=y
|
||||
# UCLIBC_SV4_DEPRECATED is not set
|
||||
UCLIBC_HAS_REALTIME=y
|
||||
UCLIBC_HAS_ADVANCED_REALTIME=y
|
||||
|
@ -248,8 +248,8 @@ DOSTRIP=y
|
|||
# SUPPORT_LD_DEBUG is not set
|
||||
# SUPPORT_LD_DEBUG_EARLY is not set
|
||||
# UCLIBC_MALLOC_DEBUGGING is not set
|
||||
# UCLIBC_HAS_BACKTRACE is not set
|
||||
UCLIBC_HAS_BACKTRACE=y
|
||||
WARNINGS="-Wall"
|
||||
EXTRA_WARNINGS=y
|
||||
# EXTRA_WARNINGS is not set
|
||||
# DOMULTI is not set
|
||||
# UCLIBC_MJN3_ONLY is not set
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
=sys-fs/eudev-1.1 ~arm
|
|
@ -1 +0,0 @@
|
|||
=sys-apps/sandbox-2.6 ~arm
|
|
@ -1 +0,0 @@
|
|||
=dev-lang/perl-5.12.4-r1 -build
|
|
@ -0,0 +1,59 @@
|
|||
From e118373cbb58ba5ffa5fb6670957678d5b87cdb9 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sun, 10 Jun 2012 16:36:23 +0000
|
||||
Subject: eventfd: Implement eventfd2 and fix eventfd
|
||||
|
||||
eventfd: evntfd assumes to take two arguments instead it
|
||||
should be one evntfd expects two therefore implement both syscalls with
|
||||
correct parameters
|
||||
|
||||
Thanks Eugene Rudoy for reporting it and also providing the patch
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
diff --git a/libc/sysdeps/linux/common/eventfd.c b/libc/sysdeps/linux/common/eventfd.c
|
||||
index cc3f3f0..96597ab 100644
|
||||
--- a/libc/sysdeps/linux/common/eventfd.c
|
||||
+++ b/libc/sysdeps/linux/common/eventfd.c
|
||||
@@ -7,12 +7,24 @@
|
||||
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
|
||||
*/
|
||||
|
||||
+#include <errno.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
/*
|
||||
* eventfd()
|
||||
*/
|
||||
-#ifdef __NR_eventfd
|
||||
-_syscall2(int, eventfd, int, count, int, flags)
|
||||
+#if defined __NR_eventfd || defined __NR_eventfd2
|
||||
+int eventfd (int count, int flags)
|
||||
+{
|
||||
+#if defined __NR_eventfd2
|
||||
+ return INLINE_SYSCALL (eventfd2, 2, count, flags);
|
||||
+#elif defined __NR_eventfd
|
||||
+ if (flags != 0) {
|
||||
+ __set_errno (EINVAL);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ return INLINE_SYSCALL (eventfd, 1, count);
|
||||
+#endif
|
||||
+}
|
||||
#endif
|
||||
diff --git a/libc/sysdeps/linux/common/stubs.c b/libc/sysdeps/linux/common/stubs.c
|
||||
index 3567b07..1fc2393 100644
|
||||
--- a/libc/sysdeps/linux/common/stubs.c
|
||||
+++ b/libc/sysdeps/linux/common/stubs.c
|
||||
@@ -110,7 +110,7 @@ make_stub(epoll_pwait)
|
||||
make_stub(epoll_wait)
|
||||
#endif
|
||||
|
||||
-#if !defined __NR_eventfd && defined __UCLIBC_LINUX_SPECIFIC__
|
||||
+#if !defined __NR_eventfd && !defined __NR_eventfd2 && defined __UCLIBC_LINUX_SPECIFIC__
|
||||
make_stub(eventfd)
|
||||
#endif
|
||||
|
||||
--
|
||||
cgit v0.9.1
|
|
@ -0,0 +1,65 @@
|
|||
From f22cca4722fa66e424562e69f4afa2bca0af871d Mon Sep 17 00:00:00 2001
|
||||
From: "Anthony G. Basile" <blueness@gentoo.org>
|
||||
Date: Sun, 28 Jul 2013 09:08:34 -0400
|
||||
Subject: [PATCH] libc: add isfdtype()
|
||||
|
||||
isfdtype(int fd, int fdtype) check whether a file descriptor fd is
|
||||
of type fdtype, where the types are defined in stat(2). It is
|
||||
supported in glibc and BSD, and used by utilities such as acpid.
|
||||
|
||||
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
libc/misc/file/isfdtype.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
create mode 100644 libc/misc/file/isfdtype.c
|
||||
|
||||
diff --git a/libc/misc/file/isfdtype.c b/libc/misc/file/isfdtype.c
|
||||
new file mode 100644
|
||||
index 0000000..4d9199b
|
||||
--- /dev/null
|
||||
+++ libc/misc/file/isfdtype.c
|
||||
@@ -0,0 +1,40 @@
|
||||
+/* Determine whether descriptor has given property.
|
||||
+ Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
+ This file is part of the GNU C Library.
|
||||
+
|
||||
+ The GNU C Library is free software; you can redistribute it and/or
|
||||
+ modify it under the terms of the GNU Lesser General Public
|
||||
+ License as published by the Free Software Foundation; either
|
||||
+ version 2.1 of the License, or (at your option) any later version.
|
||||
+
|
||||
+ The GNU C Library 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
|
||||
+ Lesser General Public License for more details.
|
||||
+
|
||||
+ You should have received a copy of the GNU Lesser General Public
|
||||
+ License along with the GNU C Library; if not, see
|
||||
+ <http://www.gnu.org/licenses/>. */
|
||||
+
|
||||
+#include <errno.h>
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/socket.h>
|
||||
+#include <sys/types.h>
|
||||
+#ifdef __UCLIBC_HAS_LFS__
|
||||
+# include <_lfs_64.h>
|
||||
+#else
|
||||
+# define stat64 stat
|
||||
+# define fstat64 fstat
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+isfdtype (int fildes, int fdtype)
|
||||
+{
|
||||
+ struct stat64 st;
|
||||
+ int save_error = errno;
|
||||
+ int result = fstat64 (fildes, &st);
|
||||
+ __set_errno (save_error);
|
||||
+ if (result)
|
||||
+ return result;
|
||||
+ return (st.st_mode & S_IFMT) == (mode_t) fdtype;
|
||||
+}
|
||||
--
|
||||
1.8.3.2.733.gf8abaeb
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
From 342a3d861fde5651ee53486addbacddcec6a0a58 Mon Sep 17 00:00:00 2001
|
||||
From: Natanael Copa <natanael.copa@gmail.com>
|
||||
Date: Sat, 04 Aug 2012 17:32:45 +0000
|
||||
Subject: pread/pwrite: backport fix
|
||||
|
||||
pread/pwrite syscalls has been renamed to pread64/pwrite in 2.6 kernel.
|
||||
|
||||
There was a fallback function using lseek for kernels who did not have
|
||||
this syscall (pre 2.1.60). This is broken in many ways.
|
||||
|
||||
uclibc have been using the broken fallback due to they forgot to rename
|
||||
pread syscall.
|
||||
|
||||
This got detected with git-1.7.11 which introduced threaded index-pack
|
||||
which broke in similar ways a windows (msys).
|
||||
|
||||
This issue in uclibc have been reported upstream and fixed in git master
|
||||
so this patch does not need to be upstreamed. It might be an idea to
|
||||
backport it properly for 0.9.33 branch though.
|
||||
|
||||
Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
|
||||
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
||||
---
|
||||
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
|
||||
index 88e6957..baf8691 100644
|
||||
--- a/libc/sysdeps/linux/common/pread_write.c
|
||||
+++ b/libc/sysdeps/linux/common/pread_write.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <unistd.h>
|
||||
#include <stdint.h>
|
||||
#include <endian.h>
|
||||
+#include <sysdep-cancel.h>
|
||||
|
||||
extern __typeof(pread) __libc_pread;
|
||||
extern __typeof(pwrite) __libc_pwrite;
|
||||
@@ -27,15 +28,17 @@ extern __typeof(pwrite64) __libc_pwrite64;
|
||||
|
||||
#include <bits/kernel_types.h>
|
||||
|
||||
-#ifdef __NR_pread
|
||||
-
|
||||
-# define __NR___syscall_pread __NR_pread
|
||||
+# define __NR___syscall_pread __NR_pread64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
+
|
||||
}
|
||||
weak_alias(__libc_pread,pread)
|
||||
|
||||
@@ -44,22 +47,24 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pread(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pread64,pread64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
|
||||
-#endif /* __NR_pread */
|
||||
-
|
||||
-#ifdef __NR_pwrite
|
||||
-
|
||||
-# define __NR___syscall_pwrite __NR_pwrite
|
||||
+# define __NR___syscall_pwrite __NR_pwrite64
|
||||
static __inline__ _syscall5(ssize_t, __syscall_pwrite, int, fd, const void *, buf,
|
||||
size_t, count, off_t, offset_hi, off_t, offset_lo)
|
||||
|
||||
ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
{
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(offset >> 31, offset));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
+ return result;
|
||||
}
|
||||
weak_alias(__libc_pwrite,pwrite)
|
||||
|
||||
@@ -68,120 +73,10 @@ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
{
|
||||
uint32_t low = offset & 0xffffffff;
|
||||
uint32_t high = offset >> 32;
|
||||
- return __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
-}
|
||||
-weak_alias(__libc_pwrite64,pwrite64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* __NR_pwrite */
|
||||
-
|
||||
-#if ! defined __NR_pread || ! defined __NR_pwrite
|
||||
-
|
||||
-static ssize_t __fake_pread_write(int fd, void *buf,
|
||||
- size_t count, off_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek(fd, offset, SEEK_SET) == (off_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. If this fails we
|
||||
- * have to return this as an error. */
|
||||
- save_errno = errno;
|
||||
- if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
|
||||
- {
|
||||
- if (result == -1)
|
||||
- __set_errno(save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno(save_errno);
|
||||
- return(result);
|
||||
-}
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-
|
||||
-static ssize_t __fake_pread_write64(int fd, void *buf,
|
||||
- size_t count, off64_t offset, int do_pwrite)
|
||||
-{
|
||||
- int save_errno;
|
||||
- ssize_t result;
|
||||
- off64_t old_offset;
|
||||
-
|
||||
- /* Since we must not change the file pointer preserve the
|
||||
- * value so that we can restore it later. */
|
||||
- if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- /* Set to wanted position. */
|
||||
- if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
|
||||
- return -1;
|
||||
-
|
||||
- if (do_pwrite == 1) {
|
||||
- /* Write the data. */
|
||||
- result = write(fd, buf, count);
|
||||
- } else {
|
||||
- /* Read the data. */
|
||||
- result = read(fd, buf, count);
|
||||
- }
|
||||
-
|
||||
- /* Now we have to restore the position. */
|
||||
- save_errno = errno;
|
||||
- if (lseek64(fd, old_offset, SEEK_SET) == (off64_t) -1) {
|
||||
- if (result == -1)
|
||||
- __set_errno (save_errno);
|
||||
- return -1;
|
||||
- }
|
||||
- __set_errno (save_errno);
|
||||
+ int oldtype = LIBC_CANCEL_ASYNC ();
|
||||
+ int result = __syscall_pwrite(fd, buf, count, __LONG_LONG_PAIR(high, low));
|
||||
+ LIBC_CANCEL_RESET (oldtype);
|
||||
return result;
|
||||
}
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
|
||||
-
|
||||
-#ifndef __NR_pread
|
||||
-ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- return __fake_pread_write(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread,pread)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, buf, count, offset, 0);
|
||||
-}
|
||||
-weak_alias(__libc_pread64,pread64)
|
||||
-# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pread */
|
||||
-
|
||||
-#ifndef __NR_pwrite
|
||||
-ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
|
||||
-{
|
||||
- /* we won't actually be modifying the buffer,
|
||||
- *just cast it to get rid of warnings */
|
||||
- return __fake_pread_write(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
-weak_alias(__libc_pwrite,pwrite)
|
||||
-
|
||||
-# ifdef __UCLIBC_HAS_LFS__
|
||||
-ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
|
||||
-{
|
||||
- return __fake_pread_write64(fd, (void*)buf, count, offset, 1);
|
||||
-}
|
||||
weak_alias(__libc_pwrite64,pwrite64)
|
||||
# endif /* __UCLIBC_HAS_LFS__ */
|
||||
-#endif /* ! __NR_pwrite */
|
||||
--
|
||||
cgit v0.9.1
|
|
@ -68,8 +68,8 @@ LDSO_CACHE_SUPPORT=y
|
|||
LDSO_PRELOAD_ENV_SUPPORT=y
|
||||
LDSO_PRELOAD_FILE_SUPPORT=y
|
||||
LDSO_BASE_FILENAME="ld.so"
|
||||
# LDSO_STANDALONE_SUPPORT is not set
|
||||
# LDSO_PRELINK_SUPPORT is not set
|
||||
LDSO_STANDALONE_SUPPORT=y
|
||||
LDSO_PRELINK_SUPPORT=y
|
||||
UCLIBC_STATIC_LDCONFIG=y
|
||||
LDSO_RUNPATH=y
|
||||
LDSO_SEARCH_INTERP_PATH=y
|
||||
|
@ -122,14 +122,14 @@ UCLIBC_GRP_BUFFER_SIZE=256
|
|||
# Support various families of functions
|
||||
#
|
||||
UCLIBC_LINUX_MODULE_26=y
|
||||
UCLIBC_LINUX_MODULE_24=y
|
||||
# UCLIBC_LINUX_MODULE_24 is not set
|
||||
UCLIBC_LINUX_SPECIFIC=y
|
||||
UCLIBC_HAS_GNU_ERROR=y
|
||||
UCLIBC_BSD_SPECIFIC=y
|
||||
UCLIBC_HAS_BSD_ERR=y
|
||||
# UCLIBC_HAS_OBSOLETE_BSD_SIGNAL is not set
|
||||
# UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL is not set
|
||||
# UCLIBC_NTP_LEGACY is not set
|
||||
UCLIBC_NTP_LEGACY=y
|
||||
# UCLIBC_SV4_DEPRECATED is not set
|
||||
UCLIBC_HAS_REALTIME=y
|
||||
UCLIBC_HAS_ADVANCED_REALTIME=y
|
||||
|
@ -248,8 +248,8 @@ DOSTRIP=y
|
|||
# SUPPORT_LD_DEBUG is not set
|
||||
# SUPPORT_LD_DEBUG_EARLY is not set
|
||||
# UCLIBC_MALLOC_DEBUGGING is not set
|
||||
# UCLIBC_HAS_BACKTRACE is not set
|
||||
UCLIBC_HAS_BACKTRACE=y
|
||||
WARNINGS="-Wall"
|
||||
EXTRA_WARNINGS=y
|
||||
# EXTRA_WARNINGS is not set
|
||||
# DOMULTI is not set
|
||||
# UCLIBC_MJN3_ONLY is not set
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
=sys-fs/eudev-1.1 ~x86
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue