Results 1 to 3 of 3

Thread: updates for Fedora packaging

  1. #1
    Join Date
    Apr 2009
    Posts
    2

    Default updates for Fedora packaging

    I made some improvements to the Fedora packaging script, which will hopefully make it into a future release. I have Catalyst 9.3 working nicely on Fedora 10.

    Disclaimers:

    1) I build my own kernels from vanilla sources (currently 2.6.28.9), so I don't know if any of the "KMS" patches affect anything.

    2) I also don't use Plymouth

    3) xorg-x11-server-Xorg contains xorg extensions with the same names as ones provided by the Catalyst driver (libdri.so and libglx.so); if that package gets updated, you will have to fix up the symlinks to point to the *.fgl.so versions. On my system at least, Catalyst 9.3 locks up the system when the xorg versions of these are present (naughty, bad AMD!).

    I do NOT have any back-leveled packages; they are the current updates for Fedora 10.

    Code:
    diff -u fglrx-install.mOYH0f/packages/Fedora/atieventsd.init fglrx-install.H180cv/packages/Fedora/atieventsd.init
    --- fglrx-install.mOYH0f/packages/Fedora/atieventsd.init	2009-03-18 08:07:25.000000000 -0700
    +++ fglrx-install.H180cv/packages/Fedora/atieventsd.init	2009-03-31 22:33:52.000000000 -0700
    @@ -10,6 +10,9 @@
     # Source function library.
     . /etc/rc.d/init.d/functions
     
    +# Create the DRI device, in case it doesn't already exist
    +MAKEDEV /dev/dri
    +
     [ -f /usr/sbin/atieventsd ] || exit 0
     
     LOCKFILE=/var/lock/subsys/atieventsd
    diff -u fglrx-install.mOYH0f/packages/Fedora/ATI-fglrx.spec-tmpl fglrx-install.H180cv/packages/Fedora/ATI-fglrx.spec-tmpl
    --- fglrx-install.mOYH0f/packages/Fedora/ATI-fglrx.spec-tmpl	2009-03-18 08:07:25.000000000 -0700
    +++ fglrx-install.H180cv/packages/Fedora/ATI-fglrx.spec-tmpl	2009-04-01 00:04:18.000000000 -0700
    @@ -2,6 +2,7 @@
     %define        _x11dir          %{_prefix}/X11R6
     %define        _x11libdir       %{_x11dir}/%{_lib}
     %define        _x11includedir   %{_x11dir}/include
    +%define        _xorgextdir      %{_libdir}/xorg/modules/extensions
     
     %ifarch x86_64
     %define        _libdir32bit     %{_prefix}/lib
    @@ -180,7 +181,7 @@
     # Build the kernel module and install it
     export AS_USER=y
     pushd $RPM_BUILD_ROOT%{_kmoddir}/fglrx/build_mod
    -bash make.sh verbose
    +bash make.sh
     mkdir -p $RPM_BUILD_ROOT%{_kmoddir}/%{_kmodver}/extra
     install -D -m 0644 fglrx.ko $RPM_BUILD_ROOT%{_kmoddir}/%{_kmodver}/extra/fglrx/fglrx.ko
     rm -rf $RPM_BUILD_ROOT%{_kmoddir}/fglrx
    @@ -191,6 +192,22 @@
     rm -rf $RPM_BUILD_ROOT
     
     
    +%pre
    +# Remove any old symlinked files
    +if [ -e %{_xorgextdir}/FGL.renamed.libdri.so ]; then
    +  rm -f %{_xorgextdir}/libdri.so %{_xorgextdir}/libdri.fgl.so 2>/dev/null
    +fi
    +if [ -e %{_xorgextdir}/FGL.renamed.libglx.so ]; then
    +  rm -f %{_xorgextdir}/libglx.so %{_xorgextdir}/libglx.fgl.so 2>/dev/null
    +fi
    +# Create backup files if we don't have them
    +if [ ! -f %{_xorgextdir}/FGL.renamed.libdri.so -a -f %{_xorgextdir}/libdri.so ]; then
    +  mv %{_xorgextdir}/libdri.so %{_xorgextdir}/FGL.renamed.libdri.so 2>/dev/null
    +fi
    +if [ ! -f %{_xorgextdir}/FGL.renamed.libglx.so -a -f %{_xorgextdir}/libglx.so ]; then
    +  mv %{_xorgextdir}/libglx.so %{_xorgextdir}/FGL.renamed.libglx.so 2>/dev/null
    +fi
    +
     %preun
     if [ "$1" = 0 ]; then
       /sbin/service atieventsd stop >/dev/null 2>&1
    @@ -210,11 +227,27 @@
         fi
       fi || :
     fi
    +# Create symlinks for modified xorg extensions
    +if [ -e %{_xorgextdir}/libdri.fgl.so ]; then
    +  ln -s %{_xorgextdir}/libdri.fgl.so %{_xorgextdir}/libdri.so
    +fi
    +if [ -e %{_xorgextdir}/libglx.fgl.so ]; then
    +  ln -s %{_xorgextdir}/libglx.fgl.so %{_xorgextdir}/libglx.so
    +fi
     /sbin/ldconfig
     /sbin/chkconfig --add atieventsd
     /usr/bin/aticonfig --initial >/dev/null 2>&1
     
     %postun
    +# Restore original xorg extensions
    +if [ -f %{_xorgextdir}/FGL.renamed.libdri.so ]; then
    +  rm -f %{_xorgextdir}/libdri.so %{_xorgextdir}/libdri.fgl.so 2>/dev/null
    +  mv %{_xorgextdir}/FGL.renamed.libdri.so %{_xorgextdir}/libdri.so 2>/dev/null
    +fi
    +if [ -f %{_xorgextdir}/FGL.renamed.libglx.so ]; then
    +  rm -f %{_xorgextdir}/libdglx.so %{_xorgextdir}/libglx.fgl.so 2>/dev/null
    +  mv %{_xorgextdir}/FGL.renamed.libglx.so %{_xorgextdir}/libglx.so 2>/dev/null
    +fi
     /sbin/ldconfig
     if [ "$1" -ge 1 ]; then
         /sbin/service atieventsd condrestart >/dev/null 2>&1
    @@ -285,11 +318,12 @@
     %{_bindir}/fglrx_xgamma
     @DRI_MODULE_DIR@/fglrx_dri.so
     @X11_MODULE_DIR@/drivers/*fglrx*.*
    +@X11_MODULE_DIR@/extensions/lib*.so
     @X11_MODULE_DIR@/linux/*fglrx*.*
     @X11_MODULE_DIR@/esut.a
     @X11_MODULE_DIR@/glesx.so
     @X11_MODULE_DIR@/amdxmm.so
    -%{_libdir}/libamd*.so
    +%{_libdir}/libati*.so
     %{_libdir}/fglrx/*.cap
     %{_libdir}/fglrx/*.so*
     %{_mandir}/man[1-9]/atieventsd.*
    @@ -326,6 +360,10 @@
     
     
     %changelog
    +* Wed Apr 01 2009 Steve Wendt <stevew AT shocking DOT com> 8.59.3-1
    +- Fix updating of xorg extensions libdri and libglx
    +- Remove verbose option from module build, since AMD hasn't fixed it
    +
     * Fri Dec 26 2008 Michael Larabel <Michael AT phoronix DOT com> 8.57.1-1
     - Add Fedora 10 support and fixes support for Fedora 9 on X.Org 7.4
     
    diff -u fglrx-install.mOYH0f/packages/Fedora/ati-packager.sh fglrx-install.H180cv/packages/Fedora/ati-packager.sh
    --- fglrx-install.mOYH0f/packages/Fedora/ati-packager.sh	2009-03-18 08:07:25.000000000 -0700
    +++ fglrx-install.H180cv/packages/Fedora/ati-packager.sh	2009-03-31 23:46:41.000000000 -0700
    @@ -110,15 +110,13 @@
     
       # Move files as required for X11R7-based distribution releases
       if echo "${X11_RELEASE}"|grep "x7.0" &> /dev/null ; then
    -    # get rid of libdri.so so we don't conflict with system package!
    -    rm -rf ${TMP_RPM_BUILD_DIR}/usr/X11R6/${ARCH_LIB}/modules/extensions
         mv ${TMP_RPM_BUILD_DIR}/usr/X11R6/include/X11 \
            ${TMP_RPM_BUILD_DIR}/usr/include
         mkdir -p ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/dri
         mv ${TMP_RPM_BUILD_DIR}/usr/X11R6/${ARCH_LIB}/modules/dri/* \
            ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/dri
         mkdir -p ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules
    -    mv ${TMP_RPM_BUILD_DIR}/usr/X11R6/${ARCH_LIB}/modules/{drivers,linux} \
    +    mv ${TMP_RPM_BUILD_DIR}/usr/X11R6/${ARCH_LIB}/modules/{drivers,extensions,linux} \
            ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules
         mv ${TMP_RPM_BUILD_DIR}/usr/X11R6/${ARCH_LIB}/modules/esut.a \
            ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules
    @@ -126,8 +124,14 @@
            ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules
         mv ${TMP_RPM_BUILD_DIR}/usr/X11R6/${ARCH_LIB}/modules/amdxmm.so \
            ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules
    -      # ln -s ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/dri/fglrx_dri.so ${TMP_RPM_BUILD_DIR}/usr/X11R6/${ARCH_LIB}/lib/modules/dri/fglrx_dri.so
           ln -fs ../../../../${ARCH_LIB}/dri/fglrx_dri.so
    +    # Rename extensions to avoid conflicts; these must be symlinked later
    +    mv ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules/extensions/libdri.so \
    +       ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules/extensions/libdri.fgl.so
    +    if [ -f ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules/extensions/libglx.so ]; then
    +      mv ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules/extensions/libglx.so \
    +         ${TMP_RPM_BUILD_DIR}/usr/${ARCH_LIB}/xorg/modules/extensions/libglx.fgl.so
    +    fi
         # Same work around for 32-on-64
         if [ "${release_arch}" = 'x86_64' ]; then
           mkdir -p ${TMP_RPM_BUILD_DIR}/usr/lib/dri

  2. #2
    Join Date
    Apr 2009
    Posts
    1

    Exclamation Does not build

    ...
    ...
    ...

    make[1]: Leaving directory `/usr/src/kernels/2.6.27.5-117.fc10.x86_64'
    build succeeded with return value 0
    duplicating results into driver repository...
    done.
    You must change your working directory to /tmp/ATI-fglrx-8.593-1-5622-root/BUILDROOT/ATI-fglrx-8.593-1.f10.x86_64/lib/modules/fglrx
    and then call ./make_install.sh in order to install the built module.
    + mkdir -p /tmp/ATI-fglrx-8.593-1-5622-root/BUILDROOT/ATI-fglrx-8.593-1.f10.x86_64/lib/modules/2.6.27.5-117.fc10.x86_64/extra
    + install -D -m 0644 fglrx.ko /tmp/ATI-fglrx-8.593-1-5622-root/BUILDROOT/ATI-fglrx-8.593-1.f10.x86_64/lib/modules/2.6.27.5-117.fc10.x86_64/extra/fglrx/fglrx.ko
    + rm -rf /tmp/ATI-fglrx-8.593-1-5622-root/BUILDROOT/ATI-fglrx-8.593-1.f10.x86_64/lib/modules/fglrx
    + popd
    /tmp/ATI-fglrx-8.593-1-5622-root/BUILD/ATI-fglrx-8.593
    + /usr/lib/rpm/check-buildroot
    + /usr/lib/rpm/redhat/brp-compress
    + /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
    + /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
    + /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
    + /usr/lib/rpm/brp-python-bytecompile
    + /usr/lib/rpm/redhat/brp-python-hardlink
    + /usr/lib/rpm/redhat/brp-java-repack-jars
    Processing files: ATI-fglrx-8.593-1.f10
    Provides: amdxmm.so()(64bit) config(ATI-fglrx) = 8.593-1.f10 fglrx_dri.so()(64bit) fglrx_drv.so()(64bit) glesx.so()(64bit) libAMDXvBA.so.1()(64bit) libGL.so.1()(64bit) libXvBAW.so.1()(64bit) libatiadlxx.so()(64bit) libaticalcl.so()(64bit) libaticaldd.so()(64bit) libaticalrt.so()(64bit) libdri.fgl.so()(64bit) libfglrx_dm.so.1.0()(64bit) libfglrx_gamma.so.1()(64bit) libfglrx_pp.so.1.0()(64bit) libfglrx_tvout.so.1()(64bit) libfglrxdrm.so()(64bit) libglx.fgl.so()(64bit)
    Requires(interp): /bin/sh /bin/sh /bin/sh /bin/sh
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires(pre): /bin/sh
    Requires(post): /bin/sh /sbin/chkconfig /sbin/ldconfig
    Requires(preun): /bin/sh /sbin/chkconfig /sbin/service
    Requires(postun): /bin/sh /sbin/ldconfig /sbin/service
    Requires: /bin/bash /bin/sh libGL.so.1()(64bit) libICE.so.6()(64bit) libSM.so.6()(64bit) libX11.so.6()(64bit) libXcursor.so.1()(64bit) libXext.so.6()(64bit) libXi.so.6()(64bit) libXinerama.so.1()(64bit) libXrandr.so.2()(64bit) libXrender.so.1()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libdl.so.2()(64bit) libdl.so.2(GLIBC_2.2.5)(64bit) libdrm.so.2()(64bit) libfglrx_dm.so.1.0()(64bit) libfglrx_gamma.so.1()(64bit) libfglrx_pp.so.1.0()(64bit) libfglrx_tvout.so.1()(64bit) libfontconfig.so.1()(64bit) libfreetype.so.6()(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgcc_s.so.1(GCC_3.3)(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpthread.so.0(GLIBC_2.3.2)(64bit) librt.so.1()(64bit) librt.so.1(GLIBC_2.2.5)(64bit) libstdc++.so.5()(64bit) libstdc++.so.5(CXXABI_1.2)(64bit) libstdc++.so.5(GLIBCPP_3.2)(64bit)
    Conflicts: fglrx fglrx-glc22 fglrx_4_3_0 fglrx_6_8_0 kernel-module-fglrx ati-fglrx ati-fglrx-devel kmod-fglrx xorg-x11-drv-fglrx xorg-x11-drv-fglrx-devel nvidia-glx nvidia-glx-legacy xorg-x11-drv-nvidia xorg-x11-drv-nvidia-legacy
    Processing files: ATI-fglrx-control-center-8.593-1.f10
    Provides: amdcccle(GLIBCPP_3.2)(64bit)
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires: libGL.so.1()(64bit) libICE.so.6()(64bit) libSM.so.6()(64bit) libX11.so.6()(64bit) libXcursor.so.1()(64bit) libXext.so.6()(64bit) libXi.so.6()(64bit) libXrandr.so.2()(64bit) libXrender.so.1()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libdl.so.2()(64bit) libdl.so.2(GLIBC_2.2.5)(64bit) libfontconfig.so.1()(64bit) libfreetype.so.6()(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpthread.so.0(GLIBC_2.3.2)(64bit)
    Processing files: ATI-fglrx-devel-8.593-1.f10
    Provides: libatiadlxx.so()(64bit)
    Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    Requires: libGL.so.1()(64bit) libX11.so.6()(64bit) libXext.so.6()(64bit) libXinerama.so.1()(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libm.so.6()(64bit)
    Processing files: ATI-fglrx-IA32-libs-8.593-1.f10
    error: File not found by glob: /tmp/ATI-fglrx-8.593-1-5622-root/BUILDROOT/ATI-fglrx-8.593-1.f10.x86_64/usr/X11R6/lib/modules/dri/*


    RPM build errors:
    File not found by glob: /tmp/ATI-fglrx-8.593-1-5622-root/BUILDROOT/ATI-fglrx-8.593-1.f10.x86_64/usr/X11R6/lib/modules/dri/*

  3. #3
    Join Date
    Apr 2009
    Posts
    2

    Default

    Quote Originally Posted by Nyyr View Post
    ...
    RPM build errors:
    File not found by glob: /tmp/ATI-fglrx-8.593-1-5622-root/BUILDROOT/ATI-fglrx-8.593-1.f10.x86_64/usr/X11R6/lib/modules/dri/*
    I didn't test (and don't run on) x86-64. I very much doubt my patch caused this problem, but it looks like it's not copying some files that it is trying to package into the RPM.

    If you figure it out, I'm happy to update my patch. If you can't figure it out, I'll look at it more closely when I get some time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •