Results 1 to 9 of 9

Thread: source packages

  1. #1
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,572
    Distro
    Xubuntu 18.04 Bionic Beaver

    source packages

    i read that i must "enable sources" to install source packages. how is that done?

    also, when source is installed, where does it go? is there a standardized way to build a binary web from that with my own patches?
    What do you call someone who speaks 3 languages? Trilingual.
    What do you call someone who speaks 2 languages? Bilingual.
    What do you call someone who speaks 1 language? American.

  2. #2
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    10,789
    Distro
    Ubuntu

    Re: source packages

    Source repositories are those pesky deb-src source entries in your /etc/apt/sources.list file.
    You need to manually edit the entries yourself from cli.

    They download the source package into whatever working directory you current are in.
    Code:
    apt source <package-name>
    will download the source to the current working directory
    you can then cd into the source directory and start working from there.

    I guess the standard way is to apply the patches then build the package.
    Some prerequisites are needed see:
    https://help.ubuntu.com/community/CompilingSoftware
    reference for applying patches:
    https://unix.stackexchange.com/quest...ftware-patches
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  3. #3
    Join Date
    Aug 2017
    Location
    melbourne, au
    Beans
    282
    Distro
    Lubuntu Development Release

    Re: source packages

    In `Software Sources` I have a 'check-box' underneath "Canonical-Supported..", "Community..", "Prop..", Software restr" there titled "Source code". It could be though I've manually added them earlier, or it's an option given I'm on a development release (20.04).

    I'd `vim /etc/apt/sources.list` myself as I find it faster than GUI... A line using my mirror is
    Code:
    deb-src http://ftp.iinet.net.au/pub/ubuntu/ focal main multiverse universe restricted

  4. #4
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,572
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: source packages

    i am unfamiliar with what you refer to as "Software Sources" since i do CLI all the time and almost no GUI. i am familiar with building software. getting a .deb package is what i don't know about, yet. my goal is to fix a bug in a package. i'll need to make the patch myself. and once i have it working, i'll also need to package the source.
    What do you call someone who speaks 3 languages? Trilingual.
    What do you call someone who speaks 2 languages? Bilingual.
    What do you call someone who speaks 1 language? American.

  5. #5
    Join Date
    Jan 2017
    Beans
    102

    Re: source packages

    A caveat: I have not done this on Ubuntu, but have several times on Debian.

    • As @deadflower stated, uncomment the deb-src line in your sources.list file or enter a line for the source repository for the package you are patching. An example line from my disco file is:
      Code:
      # deb-src http://us.archive.ubuntu.com/ubuntu/ disco universe
    • execute: apt-get update
    • execute: apt-get source <pkg name>
    • edit, compile and test.
    • run: dpkg-buildpackage - see the man page

    Debian recommends commenting out the deb-src line when you are finished downloading to reduce the load on the servers. I assume this applies to Ubuntu also.

    HTH

  6. #6
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,572
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: source packages

    it probably does. that lets them avoid scaling up the source servers.
    What do you call someone who speaks 3 languages? Trilingual.
    What do you call someone who speaks 2 languages? Bilingual.
    What do you call someone who speaks 1 language? American.

  7. #7
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,572
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: source packages

    perhaps what i need to learn is how to build a binary package and a source package of my own for both a C program that needs to be compiled and a Python program that doesn't need to be compiled. ultimately a Makefile for the C program would have 2 targets "deb" and "srcdeb" (or is that "src-deb"?). maybe the Python program needs the same. if these steps involve special features of the program, that should always be included in the source.
    What do you call someone who speaks 3 languages? Trilingual.
    What do you call someone who speaks 2 languages? Bilingual.
    What do you call someone who speaks 1 language? American.

  8. #8
    Join Date
    Jan 2017
    Beans
    102

    Re: source packages

    Sorry, I misunderstood. I thought you wanted to patch an existing package.

    The Debian wiki has a couple of pages on packaging:
    https://wiki.debian.org/HowToPackageForDebian
    https://wiki.debian.org/Packaging/In...ebianPackaging

    Also, this site has a simple binary package example: https://linuxconfig.org/easy-way-to-...age-repository

  9. #9
    Join Date
    Jan 2010
    Location
    Wheeling WV USA
    Beans
    1,572
    Distro
    Xubuntu 18.04 Bionic Beaver

    Re: source packages

    it is an existing package called dclock that displays time in a wrong way. sometimes it skips 1 second. sometimes it does the skip in 1 second and sometimes in 2 seconds. sometimes it displays the same time for 2 seconds instead of just one. i've seen this exact problem before and i think i know what the cause in this program is. if i am correct about that, what i think will fix it might work right. so, i want to try it. if my fix works, i want to send my source patch to the author and Canonical. i want to also make a .deb file and send that to Canonical
    What do you call someone who speaks 3 languages? Trilingual.
    What do you call someone who speaks 2 languages? Bilingual.
    What do you call someone who speaks 1 language? American.

Bookmarks

Posting Permissions

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