Announcement

Collapse
No announcement yet.

Creating deb packages from scratch

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

    #16
    Re: Creating deb packages from scratch

    While we're talking about packages, here's a lister for showing installed packages by install times.

    Code:
    # Probably requires bash. I don't think dash will do it right.
    _pkg_times()
    {
     echo
     for i in /var/lib/dpkg/info/*.list; do
     local a=`stat $i | sed '/Modify:/!d; s|Modify: ||; s|\..*||'`
     local b=`basename $i .list`
     b=$b"               "
     printf "%.40s: % 20s\n" "$b          " "$a"
     done
    }
    
    pkg_times() 
    {
     # echo "Working... pls wait."
     _pkg_times | sort -k 2
    }
    Copy to a text file named 'test.src' and type 'source test.src' to load the definitions, or just copy it into a terminal and then...

    type 'pkg_times' to run it.

    If you temporarily install untilities for a specific job, you can get a good idea what you installed including dependencies so you can uninstall them when you no longer need or want them.

    Comment


      #17
      Re: Creating deb packages from scratch

      Linux is keeping logs: https://help.ubuntu.com/community/LinuxLogFiles

      With the Debian based the installed/updated/removed packages are ending to the the dpkg log.

      Recent status log:
      Code:
      grep "status installed" /var/log/dpkg.log
      Code:
      grep upgrade /var/log/dpkg.log
      Code:
      grep remove /var/log/dpkg.log
      A bit older dpkg log:
      Code:
      grep "status installed" /var/log/dpkg.log.1
      Code:
      grep upgrade /var/log/dpkg.log.1
      Code:
      grep remove /var/log/dpkg.log.1
      The oldest logs - rotated dpkg logs (packed): dpkg.log.2.gz, dpkg.log.3.gz...
      Have you tried ?

      - How to Ask a Question on the Internet and Get It Answered
      - How To Ask Questions The Smart Way

      Comment


        #18
        Re: Creating deb packages from scratch

        Originally posted by rainbowsally
        On the 11.10 system this happens if I try to install konqueror using the archives on the 12.04 DVD.
        Dude -- this is your problem! How can you expect a dependency resolver to handle this situation?

        Comment


          #19
          Re: Creating deb packages from scratch

          Originally posted by SteveRiley
          Originally posted by rainbowsally
          On the 11.10 system this happens if I try to install konqueror using the archives on the 12.04 DVD.
          Dude -- this is your problem! How can you expect a dependency resolver to handle this situation?
          1. Yes it is my problem.

          2. I'll show you how... eventually.

          3. Next let's look at how to make a custom offline archive that will be recognized by apt-get.

          Comment


            #20
            Re: Creating deb packages from scratch

            This post is obsolete so I deleted it.

            Reworked the "toy" I had posted here and turned it into an application that seems to do the job.

            If you want your custom offline archives to be recognized [and muon and apt-get to work if you have only dialup] you can....

            http://kubuntuforums.net/forums/inde...opic=3119981.0

            I'm not sure about other distros but 12.04 was dangerous. The package list didn't match the files in the archive and I almost lost my kde and x11 once, and I actually did lose them a second time -- on purpose as a test to see if it really was that messed up. :-)

            Comment


              #21
              Re: Creating deb packages from scratch

              Originally posted by rainbowsally
              Copied to file. (I'm stuck with windows for my dialup.)
              Hi...

              How come? Can you open a terminal and run:

              Code:
              lspci
              I would be curious to see what the chipset is for your modem. There might be a a driver for it and if you're using a desktop, a replacement that could use a Linux driver.

              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


                #22
                Re: Creating deb packages from scratch

                Hi Ardvark71.

                Originally posted by ardvark71
                Originally posted by rainbowsally
                Copied to file. (I'm stuck with windows for my dialup.)
                Hi...

                How come? Can you open a terminal and run:

                Code:
                lspci
                I would be curious to see what the chipset is for your modem. There might be a a driver for it and if you're using a desktop, a replacement that could use a Linux driver.

                Regards...

                I'll give it a spin a bit later. My external modem might work, it just hasn't so far. My so-called linmodem wasn't. It was the motorola pci-13 thing, that was falsely touted as a linmodem a few years back.

                But really, I am enjoying the isolation for now. Eventually I'll get a high speed connection.

                BTW, part of the problem I was having with muon and apt-get was that the 12.4 Package lists don't match what's on the DVD.

                Hey Steve! "Eventually" just got a bit sooner. :-) That was why apt-get was demolishing my kde and even my x11. It thought there were replacements. It thought the files I had were there by accident, bad versions.

                But lo! It was the package list that was loaded with bad version info.

                :-)

                At least it was "bad" from the point of view of a dialup user.

                Really bad.

                .

                Comment


                  #23
                  Re: Creating deb packages from scratch

                  Hi sighlord48.

                  Turns out the archives Package folders had the wrong files listed, or that Kubuntu folks assumed people had an internet connection.

                  drdruidphd also discovered this problem and he fixed it a different way, but the apt-get/muon bug (which is actually a package list bug) is why apt and muon don't work for some of us.

                  Details of a fix here.

                  http://kubuntuforums.net/forums/inde...opic=3119981.0

                  It includes some detail on how to deal with extracting info from deb archives without the usual array of dpkg tools and so forth.

                  It's not a polished solution but it keeps us from inadvertently uninstalling everything from libc-bin on up out of our systems.

                  One more note at the bottom...

                  Originally posted by sithlord48
                  wait you mean i don't have to set up my debian folder and containing files manually. i have made a few .deb packages for mine (and others) programs. when getting set to be sure they would build correctly on the my PPA. after you have a ppa its all done by the ppa. you only upload source in an archive that contains the debian folder so it can compile and make the deb for you. so the question becomes what compression does the launchpad build service use because if we could get it to use lmza for all packages this would be of good for everyone.granted it would take a bit longer to compress, but that only happens once dl's and uncompress happens lots more(as stated above). Slow internet or not why download 5mb of a zip file when the same file lmza compressed is smaller lets say around 3mb smaller.something like this would help everyone and make transfers from the servers faster. i think if lanuchpad is not doing this then it needs to happen.
                  I've been thinking of you ever since I reworked the script based interactive tools I first uploaded. The revised set of tools grew to quite a large size (too large and complicated to post) but now that apt-get and muon behave I no longer need them for anything except testing and other special purposes.

                  That aside, if the copying the archive to the hard drive works (in the newer post linked above), If anyone wanted to rework it so the package list could live on the hard drive and the repository still be on the DVD, that would be fantastic.

                  Any takers? :-)

                  .

                  Comment


                    #24
                    Re: Creating deb packages from scratch

                    I hope not

                    Comment


                      #25
                      Re: Creating deb packages from scratch

                      Originally posted by rainbowsally
                      This post is obsolete so I deleted it.

                      Reworked the "toy" I had posted here and turned it into an application that seems to do the job.

                      If you want your custom offline archives to be recognized [and muon and apt-get to work if you have only dialup] you can....

                      http://kubuntuforums.net/forums/inde...opic=3119981.0

                      I'm not sure about other distros but 12.04 was dangerous. The package list didn't match the files in the archive and I almost lost my kde and x11 once, and I actually did lose them a second time -- on purpose as a test to see if it really was that messed up. :-)

                      12.04 is by its nature subject to these sorts of temporary maladies, sometimes fixed in minutes, sometimes a day or more. it is alpha software. It is currently in a constant state of change.



                      I must have forgotten to add my usual pre-release caveats to the 12.04 section.........


                      The title of this thread has nothing to do with the actual content
                      Multiple threads are welcome and encouraged

                      Comment


                        #26
                        Re: Creating deb packages from scratch

                        I appreciate your attempts to keep me grounded in reality, but I don't think you understand that the accidental uninstalling of practically everything in your kubuntu installation has been documented from at least April 2010, which drdruidphd posted about.

                        His solution was to download all the packages he noticed were misfits.

                        I'll bet he never does much C/C++ programming or I don't think that chore would have been in the least manageable since just about everything is out of whack that joins at libc, libc-bin, or any of the other low level libs which unfortunately call for specific ubuntu versions which are not on our systems.

                        [Unless he was able to 'apt-get update' online which will replace the bogus Package info with valid info from online sources.]

                        Steve suggested using 'equiv' to generate metapackages to create these aliases.

                        That would have worked if the wrong versions weren't at a higher priority than even 'Required:' which makes them un-upgradable without an internet connection which will REMOVE the supplied (and bogus) Package data.

                        I.e., it may not be 'broke' for you. That doesn't mean it ain't broke.

                        One more comment re. 'threads' below.

                        Originally posted by claydoh
                        Originally posted by rainbowsally
                        This post is obsolete so I deleted it.

                        Reworked the "toy" I had posted here and turned it into an application that seems to do the job.

                        If you want your custom offline archives to be recognized [and muon and apt-get to work if you have only dialup] you can....

                        http://kubuntuforums.net/forums/inde...opic=3119981.0

                        I'm not sure about other distros but 12.04 was dangerous. The package list didn't match the files in the archive and I almost lost my kde and x11 once, and I actually did lose them a second time -- on purpose as a test to see if it really was that messed up. :-)

                        12.04 is by its nature subject to these sorts of temporary maladies, sometimes fixed in minutes, sometimes a day or more. it is alpha software. It is currently in a constant state of change.



                        I must have forgotten to add my usual pre-release caveats to the 12.04 section.........


                        The title of this thread has nothing to do with the actual content
                        Multiple threads are welcome and encouraged
                        Here's another thread for you.
                        http://kubuntuforums.net/forums/inde...3982#msg283982

                        How could it be that two years later I 'discovered' the same pheonomenon?

                        Discovered, identified AND fixed!

                        You're welcome, of course. ;-)

                        .

                        Comment


                          #27
                          Re: Creating deb packages from scratch

                          I looked at that older thread you posted in, rainbow, and it reminded me of something. Packages can be flagged as "automatic" or "manual." If I understand this correctly, apt-get autoremove will remove any package flagged "automatic" and for which no reverse dependencies can be found. Perhaps, in your experimentation, these flags have somehow become incorrectly set? Just a thought...

                          Comment


                            #28
                            Re: Creating deb packages from scratch

                            Originally posted by SteveRiley
                            I looked at that older thread you posted in, rainbow, and it reminded me of something. Packages can be flagged as "automatic" or "manual." If I understand this correctly, apt-get autoremove will remove any package flagged "automatic" and for which no reverse dependencies can be found. Perhaps, in your experimentation, these flags have somehow become incorrectly set? Just a thought...
                            Thanks for the tip. I'll check.

                            To Claydoh here.

                            I had to delete that thread entirely where I posted how to get the archives to work with muon. I couldn't see the usual menu item allowing 'modify'. That needed a WARNING EXPERIMENTAL note on it for sure. I allowed the updated to run, and man oh man, I don't know if I have kubuntu when I get back into my linux partition.

                            I know that isn't useful to "everyone" but then what are we doing using linux, eh? Isn't 'everyone' using Windows?

                            That was not a good argument. ;-)

                            Comment


                              #29
                              Re: Creating deb packages from scratch

                              Hi claydoh.

                              Originally posted by claydoh
                              Originally posted by rainbowsally
                              This post is obsolete so I deleted it.

                              Reworked the "toy" I had posted here and turned it into an application that seems to do the job.

                              If you want your custom offline archives to be recognized [and muon and apt-get to work if you have only dialup] you can....

                              http://kubuntuforums.net/forums/inde...opic=3119981.0

                              I'm not sure about other distros but 12.04 was dangerous. The package list didn't match the files in the archive and I almost lost my kde and x11 once, and I actually did lose them a second time -- on purpose as a test to see if it really was that messed up. :-)

                              12.04 is by its nature subject to these sorts of temporary maladies, sometimes fixed in minutes, sometimes a day or more. it is alpha software. It is currently in a constant state of change.



                              I must have forgotten to add my usual pre-release caveats to the 12.04 section.........


                              The title of this thread has nothing to do with the actual content
                              Multiple threads are welcome and encouraged
                              Turns out I do NOT have a working kubuntu after returning to my linux partition (see note to Steve above).

                              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?

                              :-)

                              Look, If I was bothered the nuts and bolts business of making things work, I'd have gone back to openSUSE. As it is, I'm already so close I can taste it.. with minor things like not being able to mount an audio CD being my main obstacles (and the reason I tried updating the whole mess -- which, as usual, DESTROYED kde... not to mention X11).

                              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.

                              No harm done, eh?

                              And no, I'm not offended by your remarks. But neither do I find them having much real merit in this thread. ;-)

                              And I love that about this kubuntu forum. We HAVE this thread.

                              outstanding... :-)

                              Well... got some reinstalling to do. See you in a bit. ;-)

                              PS. Can't wait until I can bust into the qt4 programming stuff. Bash sucks.

                              PPS. What this has to do with the original thread is that in order to create custom deb packages from scratch that work with the system, the system has to work with the system first, no?

                              PPPS. Don't be offended by my remarks either, but thought police went out of style in 1984. ;-)

                              PPPPS. To be continued.... :-) [Relax, claydoh. No harm done. Kubuntu is remarkably resiliant -- especially 11.10. And I know this because I have put it through so much! I could probably get it back up and running from the mess it's now in, but it's faster to reinstall -- and I don't even need to back up my home folder. Just rename it and remove the /var and the apt-clone folder if it exists so kubuntu doesn't 'hang forever' trying to get online, or whatever it does, and I'm back to where I was before my latest screw up.]

                              :-)

                              .

                              Comment


                                #30
                                Re: Creating deb packages from scratch

                                wait what packages have been being forced to remove? what are you installing??

                                i only have a few packages on my ppa.

                                https://launchpad.net/~sithlord48/+archive/ff7

                                they are just mostly toys for playing with the internals of ff7. next time i get asked to pack up a tool ill try your script, its not often cause most ppl are not using a cross platform toolkits, but instead using windows only stuff (i.e .net) only myself and one other programmer are writing tools with Qt. im hoping this will change as im thinking of making a set of objects for others to start projects with , but thats not really on topic for this forum or thread.
                                Mark Your Solved Issues [SOLVED]
                                (top of thread: thread tools)

                                Comment

                                Working...
                                X