Announcement

Collapse
No announcement yet.

Creating deb packages from scratch

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #31
    Re: Creating deb packages from scratch

    Originally posted by sithlord48
    they are just mostly toys for playing with the internals of ff7
    (Sorry to go off-topic)

    Are you involved at all with the Q-Gears project?

    I love FF7, and still play it occasionally on my PC using the PCSX emulator.
    sigpic
    "Let us think the unthinkable, let us do the undoable, let us prepare to grapple with the ineffable itself, and see if we may not eff it after all."
    -- Douglas Adams

    Comment


      #32
      Re: Creating deb packages from scratch

      Originally posted by rainbowsally
      Turns out I do NOT have a working kubuntu after returning to my linux partition (see note to Steve above).
      This is really not surprising, given that you've contorted the package management system and the packages themselves into a state that certainly has never been tested and probably has never been planned for.

      Originally posted by rainbowsally
      There's a fix. There always is. What do you think? Should I just rewrite all the bogus version numbers in /var/lib/dpkg/status to match what's in the archive on the DVD?... Is there a script that will do that for me already?
      Do what was suggested in the thread you deleted -- use the existing DVD in its offline form. I'm not yet convinced that a system originally built offline from the downloaded DVD contains packaging errors. Can you quote some specific examples?

      Originally posted by rainbowsally
      And when I find a simple way to make things work for folks with dialup (like people in the orient where about 80 percent of them use dialup) I'd just as soon share my discoveries.
      This is disputable. First, what's "the Orient"? My friends in Singapore, South Korea, Malaysia, and China's coastal cities all enjoy higher bandwidth at lower cost than I do here in Seattle. Yes, other areas in south and south-east Asia have truly crappy Internet connections, but then (in my observation) most of the people who live there aren't going to be attempting to install Linux -- they go to Internet cafes.

      Originally posted by rainbowsally
      And no, I'm not offended by your remarks. But neither do I find them having much real merit in this thread. ;-)
      We've been trying to encourage you to examine the supplied standard methods for managing a system and then documenting, in crisp clear language, specific changes and improvements that would apply to a user community of more than yourself. Claydoh's comments are spot-on: you aren't doing this, your posts tend to ramble, and they intermix philosophy with recommended steps that, frankly, demonstrate some of your own confusion and definitely will confuse many readers here.

      Originally posted by rainbowsally
      And I love that about this kubuntu forum. We HAVE this thread.
      We're not of the mind to censor here. But we do request that experiments be interesting and useful.

      Originally posted by rainbowsally
      PPPS. Don't be offended by my remarks either, but thought police went out of style in 1984. ;-)
      Unfair and uncalled for. No one here is telling you what to think.

      Comment


        #33
        Re: Creating deb packages from scratch

        Originally posted by HalationEffect
        Originally posted by sithlord48
        they are just mostly toys for playing with the internals of ff7
        (Sorry to go off-topic)

        Are you involved at all with the Q-Gears project?
        I love FF7, and still play it occasionally on my PC using the PCSX emulator.
        [offtopic]
        i am not part of the qgears project, i deal mostly with the savemap since i write black chocobo and im also a team avalanche member. over @ qhimm's forum we all kinda work together (at least the "core" members) and our projects tend to overlap. when time comes that Q-gears is working ill most likley insure it gets on my ppa so that its ez to install for debian/ubuntu users. i play mostly on my PC because it works in wine and its getting updated (again TA member so i have to test new models and textures). if you intrested in ff7 you should check out Qhimm's Forums its a pretty active community.
        [/offtopic]
        Mark Your Solved Issues [SOLVED]
        (top of thread: thread tools)

        Comment


          #34
          Re: Creating deb packages from scratch

          Hi Steve.

          First off, I'm bailing on Kubuntu. Not because of instability. It's remarkably resiliant. Not because of the flak I get in the forums. This is nothing compared to others. Not because I dislike the system. Nothing could be further from the truth.

          It's because it's so g*d d*mned hard for dialup users who can't get out and, for example, find out why amarok is brain-dead and the audio CD won't even mount.

          My perfect linux would have the insight and low level simplicity of kubuntu, the ease of use (with installation preference overrides PER package) of openSUSE...

          Version 10.

          All of the newer linuxes, pretty much suck. I think they're in a race with themselves and don't take care of business in what they've already created.

          Now... Let me address your post point by point below...


          Originally posted by SteveRiley
          Originally posted by rainbowsally
          Turns out I do NOT have a working kubuntu after returning to my linux partition (see note to Steve above).
          This is really not surprising, given that you've contorted the package management system and the packages themselves into a state that certainly has never been tested and probably has never been planned for.
          I forgot to mention Windows. It's 'hands-off' and I think linux following this example is a terrible mistake. The commandline is such a powerful tool and so easy to work with (or at least it used to be), so you can even create simple gui apps in two lines of bash script.

          We are P*SSSING this incredible opportunity to kick OS butt away.


          Originally posted by rainbowsally
          There's a fix. There always is. What do you think? Should I just rewrite all the bogus version numbers in /var/lib/dpkg/status to match what's in the archive on the DVD?... Is there a script that will do that for me already?
          Do what was suggested in the thread you deleted -- use the existing DVD in its offline form. I'm not yet convinced that a system originally built offline from the downloaded DVD contains packaging errors. Can you quote some specific examples?

          I could quote tons of them. What I finally did (before deciding to quit this OS) was to use dpkg-repack to recreate the packages that were installed. Then I created the archive. Then I used the tool I had to delete (couldn't edit the forum to mark it as potentially dangerous) to create the Package.gz file and I used apt-get update (with all the other online archives commented out of /etc/apt/souces.list) to add it to the 'downloads' so it wouldn't just uninstall stuff with no access to what it thought it needed.

          But I'm in Windows.

          Windows is my modem driver.

          I can't get examples from here, but one in particular that is problematic is libgomp1. That particular file, not only can't install (from the 12.04 DVD into the 11.10 installation), but it has an error in the dependency line (calls out for a version number).

          Now let me get a step ahead of you here.

          You will say. No wonder! You are installing 12.04 files into 11.10. That will never work.

          Wait a sec. They are binary compatible and darned nere checksum identical. I did find about 7 files that were different md5sums.

          In the docs.

          And it's like that, Steve.
          Originally posted by rainbowsally
          And when I find a simple way to make things work for folks with dialup (like people in the orient where about 80 percent of them use dialup) I'd just as soon share my discoveries.
          This is disputable. First, what's "the Orient"? My friends in Singapore, South Korea, Malaysia, and China's coastal cities all enjoy higher bandwidth at lower cost than I do here in Seattle. Yes, other areas in south and south-east Asia have truly crappy Internet connections, but then (in my observation) most of the people who live there aren't going to be attempting to install Linux -- they go to Internet cafes.
          I'll concede the point. I heard it on PBS, I think, but who knows. Seems like the USA is a bit retarded internet-wise.

          I wonder what happened to the fiber optic infrastructure they were planning. That was the "deal" they cut with Congress so that the feds would allow them to charge $5 a month for caller-id, which only costs them 5 cents a month to provide. That money was supposed to go to creating an EMP-proof, laser-proof communication network on earth, not out there in space where these things are only protected by redundancy and cost pennies on the dollar to destroy.

          Whatever.


          Originally posted by rainbowsally
          And no, I'm not offended by your remarks. But neither do I find them having much real merit in this thread. ;-)
          We've been trying to encourage you to examine the supplied standard methods for managing a system and then documenting, in crisp clear language, specific changes and improvements that would apply to a user community of more than yourself. Claydoh's comments are spot-on: you aren't doing this, your posts tend to ramble, and they intermix philosophy with recommended steps that, frankly, demonstrate some of your own confusion and definitely will confuse many readers here.


          Obviously the supplied standard methods don't work for me.

          The confusion problem has been solved, however. After this post.
          Originally posted by rainbowsally
          And I love that about this kubuntu forum. We HAVE this thread.
          We're not of the mind to censor here. But we do request that experiments be interesting and useful.


          Sorry. I tried. ;-)

          Originally posted by rainbowsally
          PPPS. Don't be offended by my remarks either, but thought police went out of style in 1984. ;-)
          Unfair and uncalled for. No one here is telling you what to think.
          That was about the "thread" enforcement theme. And I don't mind claydoh's comments, nor to I mind yours.

          But the last guy that I "communicated" with was kubicle. He not only understood the issue but his solutions to my misconceptions WORKED!

          By the way, send a signal 15 to knotify, and sudo su gui's will shut down properly when you want to reboot... if anyone cares about making linux integrated from top to bottom.

          I understand that this disconnection between terminal and gui apps is the "standard" anymore, but I'm entitled to an opinion and that opnion is that it's STUPID! Not only stupid but utterly unnecessary, in openSUSE or in Kubuntu.

          I have not integrated mandrivia and... where's that stack of hopeful plasma/kde installations I have... they're around here somewhere.

          :-)

          Screwit, Steve.

          I'm done.

          Comment


            #35
            Re: Creating deb packages from scratch

            Originally posted by rainbowsally
            It's because it's so g*d d*mned hard for dialup users who can't get out and, for example, find out why amarok is brain-dead and the audio CD won't even mount.
            Hello again, my fellow intrepid experimenters!

            I tried to back up the entire state of my kubuntu using dd piped through gzip and reinstalled another Linux and what do you know. It couldn't find my audio CD either. Amarok was still brain-dead.

            So the problem occurs upstream somewhere. But where?

            When we dig into it a bit we see that the setup for identifying content and what services apply, the logic has enough words to describe it, but it's very unclear and there is no 'dictionary' of 'properties' to choose from. So if you wipe out your menu (which I've done often), you'd have no clue what you can attempt to scan for.

            Exact, conjunct, and disjunct. How clear could it be?

            Apparently even the software guys can't understand that lingo. So much for the old remedy: rtfm. If the guys that created amarok can't figure it out... well... nuff said on that I suppose.

            EQUALS, AND and OR. That's apparently what all that nonsense means. Now finding the desktop files or the xml definitions... that's the hard part. :-(

            When I attempted to ungzip -c piped back through dd to restore my kubuntu after discovering that kubuntu was innocent in this crime, it wiped out my partition. Had to reformat. Lost ALL of my data. (At least I think I did.)

            I'm here in the forums again to look for an explanation and possibly to repost the tool to create offline repositories, which I deleted because I couldn't edit the post to comply with this forums rules. IT'S BOTH DANGEROUS AND EXPERIMENTAL.

            And the reason it's dangerous is because muon and apt-get won't allow you to override it's selections for deletion. In my system (11.10 for the desktop because 12.04 is unusable for a programming system and 12.04 for the software because my 11.10 Live CD has no software), even binary identical, right down to the md5sums, get removed from a working system (including kde and even x11 !!!), causing me to have to restore from backup tarballs...

            but apparently I can't restore the entire drive at once, gzipping as I go.

            Back to the custom deb packaging notion here:

            For starters, if anyone needs to do this (this would be folks that installed from the Live CD), take a look at dpkg-repack. You can recreate the deb packages from what is currently running on your system.

            Disclaimer: If this is off topic, prove it. And if this post rambles, it still makes more sense than notifier menus that you can't modify adequately -- you are stuck what whatever EQUALs ANDs and ORs they have set up.

            You may change their functionality but not how many filters to set up. As a result Amarok's menu apparently cannot be modified to work without manually editing some files somewhere. (This dies into the reason for the 'su thread' which allowed commandline launching of ANY editor, nanto, kwrite, or kate, as user or as superuser with zero changes in syntax... but nevermind, ok?)

            And what get's mounted as /dev/sr0 remains a mystery.

            Any experimenters out there? ;-)

            I saw one here a while back...

            Comment


              #36
              Re: Creating deb packages from scratch

              Hi rainbowsally...

              I've had dial-up in the past and I know it's hard.

              While I don't know where you live or who your ISP is, I'm wondering if there is an outfit that can offer high speed dial-up, like this one, for Linux without any required dialer software (other than the OS?) If it's possible and within your budget, you might want to call around and see what's available.

              Of course, it won't be like broadband but it might help a little.

              Regards...
              Our Lord and Savior Jesus Christ loves and cares about you most of all! http://peacewithgod.jesus.net/
              How do I know this personally? Please read here: https://www.linuxquestions.org/quest...hn-8-12-36442/
              PLEASE LISTEN TO THIS PODCAST! You don't have to end up here: https://soulchoiceministries.org/pod...i-see-in-hell/

              Comment


                #37
                Re: Creating deb packages from scratch

                Hi Ardvark.

                Originally posted by ardvark71
                Hi rainbowsally...

                I've had dial-up in the past and I know it's hard.

                While I don't know where you live or who your ISP is, I'm wondering if there is an outfit that can offer high speed dial-up, like this one, for Linux without any required dialer software (other than the OS?) If it's possible and within your budget, you might want to call around and see what's available.

                Of course, it won't be like broadband but it might help a little.

                Regards...
                I just prefer dialup at the moment. :-)

                BTW, if Steve is around, one of the reasons I like you guys so much is that I get banned over at openSUSE every three or four posts.

                Like I told Kubicle. You guys seem nice even when you aren't. ;-)

                Here's the latest from the openSUSE forums.

                You have been banned for the following reason:
                No reason was specified.

                Date the ban will be lifted: Never
                I must admit that openSUSE is a bit easier to compile on than kubuntu, especially the latest version which demolishes the PATH and LD_LIBRARY_PATH in the environment. But I'm glad for the experience because kubuntu is much more demanding than openSUSE and caught several errors in my 'configure' setup.

                I timed the last compile. Four hours.

                That's a long time to wait to see what you got wrong, eh?

                Back to why I was banned over at openSUSE.

                I posted on how to get gui apps to work from a terminal as either su or a user here at the kubuntu forums. I didn't know at the time that the code would only work on openSUSE, but with kubicle's and vinny's help we got over the first hump and with the inclusion of a utility to...

                Code:
                list=`pgrep knotify4 -u root`
                for i in $list; do kill -s 15 $i; done
                it seems to clear out the stuff that may cause kubuntu to hang on logout or shutdown.

                That code for openSUSE that I put up here was what I got banned for a few days before Christmas.

                When I had finished paying my debt to society (it was a 10 day banishment) I posted a LINK to kubuntu where the openSUSE code was. That thread got removed when they banned me.

                So whether I like the (to me, very dangerous muson/apt-get based) kubuntu or not, I truly love kubuntu's forums.

                Sorry. It's a bit off topic. :-)

                Well, maybe not, actually (to claydoh). This all applies to customizing your setup. I see no reason why linux should be Windows-friendly and linux-unfriendly (see bootloader -- it breaks older linuxes that we may need to FIX newer ones?) and the definition of open "source" which strongly implies that one might actually compile "source" on their system.

                And while most of this is a kde issue, not a kubuntu (or even an openSUSE) issue. The fact that we are more amenable to Windows than the system our Desktop Environments are utterly dependent on is telling.

                And what it tells us is that we are running the wrong race.

                The field goal is 'that-a-way' folks. :-)

                And creating deb packages that I could use to install and uninstall my own modifications to kubuntu was to be one step toward becoming independent of the nonsense being dictated from the top down to us.

                And it makes reinstalling much easier. :-)

                I'm using openSUSE again for the moment.

                Best wishes to all.

                .

                Comment


                  #38
                  Re: Creating deb packages from scratch

                  Dropped by and noticed my code for clearing out root's kdnotify was missing the SIGHUP.

                  I corrected it above.

                  Sorry about the omission. I post from Windows and can't see the linux code unless I think to export it to a file first.

                  PS. Managed to restore may old home and data for kubuntu. Had to extract the dd output to a 20 gig file and then mount that file as ext3, but it worked.

                  Again, here's the code to clear out stuff left behind by "sudo su" commandline running gui apps.

                  Code:
                  list=`pgrep knotify4 -u root`
                  for i in $list; do kill -s 15 $i; done
                  Code required by /root/.bashrc to make this all work without su wrappers and without crashing if you launch gui apps from a script is as follows.

                  Code:
                  # for kubuntu only. Well, probably all Debian, actually. Add to bashrc or
                  # whatever rc file is appropriate. May cause your desktop to hang on 
                  # logout or shutdown without a method to send SIGHUP to root's knotify
                  # though, or the gui apps leftover in root's proc list won't shutdown for some
                  # reason.
                  if [ -n "$SUDO_USER" ]; then
                   export SUDO_USER_HOME=$(grep -e "^$SUDO_USER:" /etc/passwd | cut -d ":" -f6)
                   export XAUTHORITY=$SUDO_USER_HOME/.Xauthority
                  fi

                  Comment


                    #39
                    Re: Creating deb packages from scratch

                    [Edited. Fixed a bug in the md5sum generation, Jan 15, 2012]

                    We've had quite a few hits on this thread. Let me attempt to resurrect the code for generating an archive from ALREADY INSTALLED packages so that muon and apt-get are less likely to strip your system down to bare bones.

                    DIALUP USERS SPECIAL: (You probably don't need this if you've got a fast internet connection)

                    WARNING EXPERIMENTAL: (This is partly from preliminary code, reassembled to the best of my recollection)

                    This is where I got to, and unfortunately I didn't have time to test it more than once before I took a break from Kubuntu.

                    The EXACT files in your system can be rebuilt as packages and you can recreate an archive that you can list in /etc/apt/sources.list.

                    Use dpkg-repack on every package in your system. And you can discover which they are by listing them.

                    Get a list of all installed packages.

                    Code:
                    df.installed() # find all installed or filter with substr
                    { 
                     # split into names and status lines
                     local a=`dpkg --get-selections | sed 's|\t|\n|; /install/!d'`
                     # delete status lines
                     a=`echo "$a" | sed '/install$/d'`
                     if [ "$1" != "" ];then
                      a=`echo "$a" | sed '/'"$1"'/!d'`
                     fi
                     echo "$a"
                    }
                    And I THINK, if that works, then to recreate all the installed packages, you can do this in a temporary directory to catch the output files.

                    Code:
                    for i in `df.installed`; do
                     dpkg-repack $i
                    done
                    Any corrections or alternate methods are more than welcome.

                    Once the collection of packages exist, they can be moved to an archive.

                    Now we need the Package file. It will be horrendously large and very sensitive as to the tags that are required, so we'll try to create a program to generate it.

                    Code:
                    BUILD_TYPE="binary-i386"
                    
                    show_params()
                    {
                     echo "
                     Examples.
                      pkgtype pkgpath  distname poolname
                      .....................................................
                      deb  file:///<path> oneiric  main
                      deb  file:///<path> precise  test
                      "
                    }
                    
                    usage()
                    {
                      echo
                      echo "Need distname and poolname (params 3 and 4 in /etc/apt/sources.list)"
                      show_params
                    }
                    
                    
                    create_package_files() # pkgpath poolname
                    {
                     local pkgpath=$1
                     local poolaname=$2
                     local fsize
                     local sum
                     
                     # echo $pkgpath/$poolname/pool; read key; cd pkgpath; return
                     
                     for i in `find $pkgpath/$poolname/pool/* -name *.deb`; do
                     {
                      # extract the control info
                      ar -x $i control.tar.gz || return 1
                      tar -xaf control.tar.gz ./control || return 1
                    
                      # add to ../Packages file removing null lines as we go.
                      cat control | sed '/^$/d' >> Packages
                    
                      # need filename tag, relative path 
                      echo "Filename: $i" | sed 's|.*\/pool\/|pool\/|' >> Packages
                      
                      # need exact file size, use disk usage (du) to get total for one file
                      fsize=`du -cb $i | sed '/total/!d; s| *total||'`
                      echo "Size: $fsize"
                      
                      # need at least md5sum, sha1sum and sha256sum appear to be optional
                    #  sum=`md5sum $i`
                    # Cut the filename from the md5sum output -rs
                      sum=`md5sum $i | cut -d' ' -f1`
                      echo "MD5sum: $sum"
                    
                     }
                     done
                     
                     # move up to where the Packages.gz and/or bz2 will be
                     cd ..
                     mv tmp/Packages .
                     # actually seems to like the unzipped version better. Not gzipping.
                     
                     # cleanup
                     rm -f tmp/*
                     rmdir tmp
                    }
                    
                    
                    # mk_Package() # distname poolname
                    mk_pool()
                    {
                     local pkgpath="$PWD"
                     local distname=$1
                     local poolname=$2
                     local indexpath
                     
                     # syntax and error checks
                     if [ "" == "$distname" ]; then 
                      usage
                      return 1
                     fi
                    
                     if [ "" == "$poolname" ]; then 
                      usage
                      return 1
                     fi
                     if [ ! -x $poolname/pool ]; then 
                      echo "Can't find '$poolname/pool' (deb files) folder"
                      return 1
                     fi
                     indexpath=dists/$distname/$poolname/$BUILD_TYPE
                     mkdir -p $indexpath/tmp
                     rm -f $indexpath/tmp/*
                     
                     # copy all the control files into the tmp dir
                     # operating from that directory temporarily
                     
                     cd $indexpath/tmp 
                     create_package_files $pkgpath $poolname
                     cd $pkgpath
                     
                    }
                    Run it as 'mk_pool' and see the help/usage notes. After testing in a dummy location, repeat as superuser in the real location for your archive if it looks like it's working. And...

                    If this all works, great. If not... let me know so I can start running. :-)

                    No dangerous globbed deletions or anything (other than in the tmp folder), so the worst any of this is likely to do is put files all over the place. Still... no warrantees. Fair enough? :-)

                    I'll try to remember to update this if necessary when I get back into kubuntu.

                    _________________________________________________

                    Or if anyone knows of a utility that already exists that creates debian archives with Package lists, go ahead and post it here and I'll remove my own somewhat experimental inventions.

                    _________________________________________________

                    Comment


                      #40
                      Re: Creating deb packages from scratch

                      Took me a while, but I finally understand what you are attempting here. Once you have your system 'as you like it', you want to create .deb packages "from the installed applications" so you can save them to some "other location/media" for use by you/others to "recreate" your OS on another PC.

                      I guess we could ask, and maybe it already was, "Why not just remaster your system using Remastersys?" It's a reasonable question, as I have to assume that you have the ability on your PC to write to CD/DVD, else, how would you make the .deb packages available to someone else?
                      Using Kubuntu Linux since March 23, 2007
                      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                      Comment


                        #41
                        Re: Creating deb packages from scratch

                        Hi snowhog.

                        Originally posted by Snowhog
                        Took me a while, but I finally understand what you are attempting here. Once you have your system 'as you like it', you want to create .deb packages "from the installed applications" so you can save them to some "other location/media" for use by you/others to "recreate" your OS on another PC.

                        I guess we could ask, and maybe it already was, "Why not just remaster your system using Remastersys?" It's a reasonable question, as I have to assume that you have the ability on your PC to write to CD/DVD, else, how would you make the .deb packages available to someone else?
                        That would be part of the plan. I do have a cd/dvd burner, but actually that would be a project for a bit further down the road.

                        Initially, I need to see what we have, then work around the occasional foul-ups caused by trying to accomodate KDE in it's conquest of the world (apparently seeking the lowest common denominator in 'portable' software, which means if Windows can't do it, nobody can), and just generally poking around to see what happens.

                        Also, I'm pretty sure most folks don't "get" this but the 12.4 DVD installed packages don't all match what's in the archives and so muon and apt-get are quite capable of stripping your system to bare bones if you don't have a live connection to the internet. They think the packages need to removed, though they are binary identical right down to the md5sums and in fact are what's running on the installed system.

                        That's not a simple matter of remastering (though I didn't even know we could do that!) :-) Thanks for that tip.

                        But the software incompatibility solution is a matter of getting the versions in sync (without going online), and that's no simple proposition, especially since 11.10 is the better base system and 12.4 has the better archive (at least for me). It will probably require fooling dpkg into thinking it already has the versions in the archives, then updates and install/uninstall won't force a clean sweep of installed binaries.

                        Thanks!

                        Comment


                          #42
                          Re: Creating deb packages from scratch

                          Originally posted by rainbowsally
                          Also, I'm pretty sure most folks don't "get" this but the 12.4 DVD installed packages don't all match what's in the archives and so muon and apt-get are quite capable of stripping your system to bare bones if you don't have a live connection to the internet. They think the packages need to removed, though they are binary identical right down to the md5sums and in fact are what's running on the installed system.
                          That sounds rather strange...are you sure you have added the dvd as a repository (man apt-cdrom) and run 'apt-get update' to refresh the apt package lists? (if you cannot/don't wish to use the online repositories, you should also comment out the online repos in /etc/apt/sources.list).

                          The dvd doesn't (obviously) contain all the packages that are available in the repos, and the repos will likely have newer version of the packages (depending on how old the dvd is), but if the md5sum is the same it's rather unlikely that there are any differences.

                          Comment

                          Working...
                          X