initial import
authorAnas Nashif <anas.nashif@intel.com>
Wed, 7 Nov 2012 16:41:39 +0000 (08:41 -0800)
committerAnas Nashif <anas.nashif@intel.com>
Wed, 7 Nov 2012 16:41:39 +0000 (08:41 -0800)
packaging/filesystem.manifest [new file with mode: 0644]
packaging/filesystem.spec [new file with mode: 0644]
packaging/iso_3166.sed [new file with mode: 0644]
packaging/iso_639.sed [new file with mode: 0644]
packaging/lang-exceptions [new file with mode: 0644]

diff --git a/packaging/filesystem.manifest b/packaging/filesystem.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/filesystem.spec b/packaging/filesystem.spec
new file mode 100644 (file)
index 0000000..73652c2
--- /dev/null
@@ -0,0 +1,223 @@
+%define disable_docs_package 1
+%define debug_package %{nil}
+Name:           filesystem
+Version:        3.1
+Release:        2%{?dist}
+License:        Public Domain
+Summary:        The basic directory layout for a Linux system
+Url:            https://fedorahosted.org/filesystem
+Group:          System Environment/Base
+# Raw source1 URL: https://fedorahosted.org/filesystem/browser/lang-exceptions?format=raw
+Source1:        https://fedorahosted.org/filesystem/browser/lang-exceptions
+Source2:        iso_639.sed
+Source3:        iso_3166.sed
+BuildRequires:  iso-codes
+Requires(pre): setup
+
+
+%description
+The filesystem package is one of the basic packages that is installed
+on a Linux system. Filesystem contains the basic directory layout
+for a Linux operating system, including the correct permissions for
+the directories.
+
+%prep
+rm -f $RPM_BUILD_DIR/filelist
+
+%build
+
+%install
+install -p -c -m755 %{SOURCE2} %{buildroot}/iso_639.sed
+install -p -c -m755 %{SOURCE3} %{buildroot}/iso_3166.sed
+
+cd %{buildroot}
+
+mkdir -p boot dev \
+        etc/{X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki} \
+        home media mnt opt proc root run/lock srv sys tmp \
+        usr/{bin,etc,games,include,%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{games,locale,modules,sse2},libexec,local/{bin,etc,games,lib,%{_lib},sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{aclocal,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11},src,src/kernels,src/debug} \
+        var/{adm,empty,gopher,lib/{empty,games,misc,rpm-state},local,lock/subsys,log,nis,preserve,run,spool/{mail,lpd,uucp},tmp,db,cache,opt,games,yp}
+
+ln -snf ../var/tmp usr/tmp
+ln -snf spool/mail var/mail
+ln -snf usr/bin bin
+ln -snf usr/sbin sbin
+ln -snf usr/lib lib
+ln -snf usr/%{_lib} %{_lib}
+
+sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \
+  >%{buildroot}/iso_639.tab
+sed -n -f %{buildroot}/iso_3166.sed /usr/share/xml/iso-codes/iso_3166.xml \
+  >%{buildroot}/iso_3166.tab
+
+grep -v "^$" %{buildroot}/iso_639.tab | grep -v "^#" | while read a b c d ; do
+    [[ "$d" =~ "^Reserved" ]] && continue
+    [[ "$d" =~ "^No linguistic" ]] && continue
+
+    locale=$c
+    if [ "$locale" = "XX" ]; then
+        locale=$b
+    fi
+    echo "%lang(${locale})     /usr/share/locale/${locale}" >> $RPM_BUILD_DIR/filelist
+    echo "%lang(${locale}) %ghost %config(missingok) /usr/share/man/${locale}" >>$RPM_BUILD_DIR/filelist
+done
+cat %{SOURCE1} | grep -v "^#" | grep -v "^$" | while read loc ; do
+    locale=$loc
+    locality=
+    special=
+    [[ "$locale" =~ "@" ]] && locale=${locale%%%%@*}
+    [[ "$locale" =~ "_" ]] && locality=${locale##*_}
+    [[ "$locality" =~ "." ]] && locality=${locality%%%%.*}
+    [[ "$loc" =~ "_" ]] || [[ "$loc" =~ "@" ]] || special=$loc
+
+    # If the locality is not official, skip it
+    if [ -n "$locality" ]; then
+        grep -q "^$locality" %{buildroot}/iso_3166.tab || continue
+    fi
+    # If the locale is not official and not special, skip it
+    if [ -z "$special" ]; then
+        egrep -q "[[:space:]]${locale%%_*}[[:space:]]" \
+           %{buildroot}/iso_639.tab || continue
+    fi
+    echo "%lang(${locale})     /usr/share/locale/${loc}" >> $RPM_BUILD_DIR/filelist
+    echo "%lang(${locale})  %ghost %config(missingok) /usr/share/man/${loc}" >> $RPM_BUILD_DIR/filelist
+done
+
+rm -f %{buildroot}/iso_639.tab
+rm -f %{buildroot}/iso_639.sed
+rm -f %{buildroot}/iso_3166.tab
+rm -f %{buildroot}/iso_3166.sed
+
+cat $RPM_BUILD_DIR/filelist | grep "locale" | while read a b ; do
+    mkdir -p -m 755 %{buildroot}/$b/LC_MESSAGES
+done
+
+cat $RPM_BUILD_DIR/filelist | grep "/share/man" | while read a b c d; do
+    mkdir -p -m 755 %{buildroot}/$d/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}
+done
+
+for i in man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p}; do
+   echo "/usr/share/man/$i" >>$RPM_BUILD_DIR/filelist
+done
+
+%pretrans -p <lua>
+--#
+--# If we are running in pretrans in a fresh root, there is no /usr and symlinks.
+--# We cannot be sure, to be the very first rpm in the transaction list,
+--# so, let's create the toplevel symlinks here and the directories they point to.
+--# When our rpm is unpacked by cpio, it will set all permissions and modes later.
+--#
+
+if posix.stat("/usr") == nil then
+    posix.mkdir("/usr")
+end
+
+for i,dir in ipairs({"/lib", "/%{_lib}", "/sbin", "/bin"}) do
+    if posix.stat("/usr"..dir) == nil then
+        posix.mkdir("/usr"..dir)
+        if posix.stat(dir, "mode") == nil then
+            posix.symlink("usr"..dir, dir)
+        end
+    end
+end
+
+return 0
+
+%post -p <lua>
+posix.symlink("../run", "/var/run")
+posix.symlink("../run/lock", "/var/lock")
+
+%files -f filelist
+%defattr(0755,root,root,-)
+%dir %attr(555,root,root)
+/bin
+%attr(555,root,root) /boot
+/dev
+%dir /etc
+%{_sysconfdir}/X11
+%{_sysconfdir}/xdg
+%{_sysconfdir}/opt
+%{_sysconfdir}/pm
+%{_sysconfdir}/xinetd.d
+%{_sysconfdir}/skel
+%{_sysconfdir}/sysconfig
+%{_sysconfdir}/pki
+/home
+/lib
+#%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
+/%{_lib}
+#%endif
+/media
+%dir /mnt
+%dir /opt
+%attr(555,root,root) /proc
+%attr(550,root,root) /root
+/run
+/sbin
+/srv
+/sys
+%attr(1777,root,root) /tmp
+%dir /usr
+%attr(555,root,root) /usr/bin
+/usr/etc
+/usr/games
+/usr/include
+%attr(555,root,root) /usr/lib
+#%ifarch x86_64 ppc ppc64 sparc sparc64 s390 s390x
+%attr(555,root,root) /usr/%{_lib}
+#%endif
+/usr/libexec
+/usr/local
+%attr(555,root,root) /usr/sbin
+%dir /usr/share
+/usr/share/aclocal
+/usr/share/applications
+/usr/share/augeas
+/usr/share/backgrounds
+/usr/share/desktop-directories
+/usr/share/dict
+/usr/share/doc
+%attr(555,root,root) %dir /usr/share/empty
+/usr/share/games
+/usr/share/ghostscript
+/usr/share/gnome
+/usr/share/icons
+/usr/share/idl
+/usr/share/info
+%dir /usr/share/locale
+%dir /usr/share/man
+/usr/share/mime-info
+/usr/share/misc
+/usr/share/omf
+/usr/share/pixmaps
+/usr/share/sounds
+/usr/share/themes
+/usr/share/xsessions
+/usr/share/X11
+/usr/src
+/usr/tmp
+%dir /var
+%{_localstatedir}/adm
+%{_localstatedir}/cache
+%{_localstatedir}/db
+%{_localstatedir}/empty
+%{_localstatedir}/games
+%{_localstatedir}/gopher
+%{_localstatedir}/lib
+%{_localstatedir}/local
+%ghost %dir %attr(755,root,root) %{_localstatedir}/lock
+%ghost %{_localstatedir}/lock/subsys
+%{_localstatedir}/log
+%{_localstatedir}/mail
+%{_localstatedir}/nis
+%{_localstatedir}/opt
+%{_localstatedir}/preserve
+%ghost %attr(755,root,root) %{_localstatedir}/run
+%dir %{_localstatedir}/spool
+%attr(755,root,root) %{_localstatedir}/spool/lpd
+%attr(775,root,mail) %{_localstatedir}/spool/mail
+%attr(755,uucp,uucp) %{_localstatedir}/spool/uucp
+%attr(1777,root,root) %{_localstatedir}/tmp
+%{_localstatedir}/yp
+
+%changelog
diff --git a/packaging/iso_3166.sed b/packaging/iso_3166.sed
new file mode 100644 (file)
index 0000000..705dbdb
--- /dev/null
@@ -0,0 +1,31 @@
+1,/<iso_3166_entries/b
+
+# on each new iso-code process the current one
+\!\(<iso_3166_entry\|</iso_3166_entries>\)!{
+    x
+    s/^$//
+    # we are on the first iso-code--nothing to process here
+    t
+    # process and write to output
+    s/\s\+/ /g
+    s/<iso_3166_entry//
+    s!/\s*>!!
+    # use '%' as a separator of parsed and unparsed input
+    s/\(.*\)alpha_2_code="\([^"]\+\)"\(.*\)/\2 % \1 \3/
+    s/\([^%]\+\)%\(.*\)alpha_3_code="\([^"]\+\)"\(.*\)/\1% \2 \4/
+    #  clear subst. memory for the next t
+    t clear
+    :clear
+    s/\([^%]\+\)%\(.*\)numeric_code="\([^"]\+\)"\(.*\)/\1% \2 \4/
+    t name
+    # no 3166 code--write xx
+    s/%/\tXX %/
+    :name
+    s/\([^%]\+\)%\(.*\)name="\([^"]\+\)"\(.*\)/\1\t\3/
+    s/ \t/\t/g
+    p
+    b
+    :noout
+}
+
+H
diff --git a/packaging/iso_639.sed b/packaging/iso_639.sed
new file mode 100644 (file)
index 0000000..e7e4d05
--- /dev/null
@@ -0,0 +1,31 @@
+1,/<iso_639_entries/b
+
+# on each new iso-code process the current one
+\!\(<iso_639_entry\|</iso_639_entries>\)!{
+    x
+    s/^$//
+    # we are on the first iso-code--nothing to process here
+    t
+    # process and write to output
+    s/\s\+/ /g
+    s/<iso_639_entry//
+    s!/\s*>!!
+    # use '%' as a separator of parsed and unparsed input
+    s/\(.*\)iso_639_2T_code="\([^"]\+\)"\(.*\)/\2 % \1 \3/
+    s/\([^%]\+\)%\(.*\)iso_639_2B_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/
+    #  clear subst. memory for the next t
+    t clear
+    :clear
+    s/\([^%]\+\)%\(.*\)iso_639_1_code="\([^"]\+\)"\(.*\)/\1\t\3 % \2 \4/
+    t name
+    # no 639-1 code--write xx
+    s/%/\tXX %/
+    :name
+    s/\([^%]\+\)%\(.*\)name="\([^"]\+\)"\(.*\)/\1\t\3/
+    s/ \t/\t/g
+    p
+    b
+    :noout
+}
+
+H
diff --git a/packaging/lang-exceptions b/packaging/lang-exceptions
new file mode 100644 (file)
index 0000000..641695a
--- /dev/null
@@ -0,0 +1,87 @@
+# This file contains a list of locality-specifc locales for which we ship
+# translations.
+#
+# The easiest way to generate this file is something along the lines of:
+#
+# repoquery -qal | awk -F '/' '/^\/usr\/share\/locale\/[a-z]*[_@]+/ { print $5 }' | sort -u
+# 
+# and then sorting out the various invalid entires. (all_languages, locales
+# with charset definitions (.UTF-8, etc.))
+af_ZA
+am_ET
+ast_ES
+az_IR
+bn_IN
+ca@valencia
+ca_ES
+ca_ES@valencian
+cs_CZ
+de_AT
+de_CH
+de_DE
+default
+el_GR
+en_AU
+en_CA
+en_GB
+en_US
+es_AR
+es_CL
+es_CO
+es_CR
+es_DO
+es_EC
+es_ES
+es_GT
+es_HN
+es_MX
+es_NI
+es_PA
+es_PE
+es_PR
+es_SV
+es_UY
+es_VE
+et_EE
+eu_ES
+fa_IR
+fr_BE
+fr_CA
+fr_CH
+fr_FR
+he_IL
+hr_HR
+hu_HU
+it_CH
+it_IT
+ja_JP
+ko_KR
+ks@devanagari
+my_MM
+nb_NO
+nds_DE
+nl_BE
+nl_NL
+pl_PL
+pt_BR
+pt_PT
+ru_RU
+sl_SI
+sq_AL
+sv_SE
+uk_UA
+ur_PK
+zh_CN
+zh_CN.GB2312
+zh_HK
+zh_TW
+zh_TW.Big5
+en@boldquot
+en@quot
+nds@NFE
+sr@ije
+sr@latin
+sr@Latn
+uz@cyrillic
+uz@Latn
+be@latin