1. 15 Nov, 2017 2 commits
  2. 12 Nov, 2017 1 commit
  3. 11 Nov, 2017 8 commits
  4. 06 Oct, 2017 2 commits
  5. 31 Jul, 2017 20 commits
    • Baptiste Daroussin's avatar
      Update NEWS · 481ba032
      Baptiste Daroussin authored
      481ba032
    • jrmarino's avatar
      Fix ELF note parsing and recognize NT_GNU_ABI_TAG · 9182756e
      jrmarino authored
      The logic on the ELF note parsing was incorrect.  It happens to work
      on *BSD, but the issue shows on other platforms (e.g. Linux ABI gets
      set to "GNU:0").
      
      The first mistake is assuming the note always has a namespace and that
      this namespace equals the standard name of the operating system.  In
      fact, having a namespace is not even required as there are default
      definitions for tags: NT_VERSION (=1) and NT_ARCH (=2).
      
      The BSDs (at least FreeBSD, DragonFly, and NetBSD) define their
      own namespace (aka "Owner" on readelf" and the NT_VERSION tag, which
      is a single word.  Pkg currently assumes the namespace is equal to
      the osname and assumes there's a NT_VERSION note defined.  For
      correctness, pkg must check that the namespace length is either zero
      or equal to an operating system name before assume a n_type value of
      1 is equivalent to an NT_VERSION note.
      
      A very popular namespace is "GNU".  The tag values of "GNU" overlap
      with with all other namespaces; for example NT_GNU_ABI_TAG is
      value 1 (same as NT_VERSION) and  NT_GNU_ABI_TAG is value 2 (same as
      the default NT_ARCH).  Thus the namespace has to be checked when
      examining n_type of ELF notes.
      
      The second issue is a lack of support for NT_GNU_ABI_TAG.  Linux
      does not use NT_VERSION note, the only one pkg supports.  The ELF
      note parsing code then mistakenly converts the note namespace "GNU"
      into the osname, thus resulting in "GNU:0:..." ABI for Linux.
      
      This code implements NT_GNU_ABI_TAG along side NT_VERSION.  As a
      result, this is the output on x86_64 Linux:
      
      ABI = "Linux:2.6.32:amd64";
      ALTABI = "linux:2.6.32:x86:64";
      
      This is the correct value in the case of Linux.  The glibc was
      compiled with Linux kernel headers from version 2.6.32 and all
      later kernels should be binary-compatible with it.
      
      It has been verified that FreeBSD and DragonFly still function as
      before with this patch.
      9182756e
    • Baptiste Daroussin's avatar
      0fa9907b
    • Baptiste Daroussin's avatar
      Update NEWS entries · e8106fed
      Baptiste Daroussin authored
      e8106fed
    • Brad Davis's avatar
      Fix duplicate pkg registration overwriting the existing pkg · 7991c496
      Brad Davis authored
      Update the tests:
      - Enable and rename the duplicate_pkgs test to duplicate_pkgs_allowed,
        to make it more clear which we are testing.  Also switch to using the
        new_pkg function to make the test cleaner.
      - Add a disabled duplicate_pkgs_allowed test in prep for that being supported.
      - Teach the register_message test to use new_manifest() and fix the duplicate
        registration it was doing.
      7991c496
    • Brad Davis's avatar
      Switch to the more normal UCL syntax · d33ebc0f
      Brad Davis authored
      d33ebc0f
    • Brad Davis's avatar
    • Baptiste Daroussin's avatar
      a0afba5f
    • Brad Davis's avatar
      Add a test that shows a problem with `pkg register' · f2339c86
      Brad Davis authored
      This is just part of a bigger test I am working on for something else.
      f2339c86
    • Brad Davis's avatar
      Sort tests · 84dd0ee3
      Brad Davis authored
      84dd0ee3
    • Vsevolod Stakhov's avatar
      Fix build with the recent libbsd. · 0c4581a2
      Vsevolod Stakhov authored
      0c4581a2
    • Santiago Castro's avatar
      Fix broken headings in Markdown files (#1565) · fc17839d
      Santiago Castro authored
      * Fix broken Markdown headings
      fc17839d
    • Brad Davis's avatar
      Clean up some grammar · 499aeea4
      Brad Davis authored
      499aeea4
    • jrmarino's avatar
      Fix drop_privileges() on Linux · 4571e489
      jrmarino authored
      As setuid will set the effective user ID as well as the real user ID, it
      is redundant to have to calls to set these IDs.  In the case of Linux,
      it is illegal.  Once the effective ID is changed from "root" to
      "nobody", pkg(8) no longer has the privilege to run setuid, resulting in
      an "Operation not permitted" error when "sudo pkg" is executed.
      
      Similarly, setegid is unnecessary when followed by setgid, but that is
      legal.  Remove both redundant steps to fix operation on the Linux
      platform and fix a spelling error while here.
      4571e489
    • jrmarino's avatar
      Another follow-up for issue #1431 · 51329e9c
      jrmarino authored
      The initial problem started with commit 4d53b1 which added the
      AT_SYMLINK_NOFOLLOW flag to fchmodat function.  On Linux, the flag is
      recognized but not implemented.  Setting the flag on Linux causes
      ENOTSUP to return in every case, which issue #1431 reported.
      
      The solution to add a second "fallback" attempt by calling fchmodat was
      accepted, but I think it was not tested on a port that contained
      symbolic links in the packing list.  It doesn't work for symbolic links.
      fchmodat will follow the link and fail with ENOENT (file not found).
      From my limited research, it's not possible to change file modes on
      symbolic links on Linux -- not until AT_SYMLINK_NOFOLLOW is implemented.
      Note that lchmod is not an option because it has not been implemented
      on Linux, nor is it part of the POSIX standard.
      
      Thus this modification which is only seen by platforms that don't
      support AT_SYMLINK_NOFOLLOW (which excludes FreeBSD, DragonFly and
      NetBSD but includes Linux) now skips symbolic links as the attempt to
      change file mode is impossible and fatal.  This is okay because the
      permissions of symlinks have never been evaluated; they are taken from
      the target of the link.  Thus changing permissions of symlinks is
      cosmetic and the impact of not modifying them is nil in all cases.
      51329e9c
    • François Tigeot's avatar
      pkg_elf.c: Only FreeBSD uses FreeBSD binaries · f16672e5
      François Tigeot authored
      * Only compile a check preventing non-FreeBSD binaries from being
        recognized as valid shared libraries on FreeBSD systems
      
      * This code was preventing shlibs_provided and shlibs_required entries
        from being put in newly created packages on non-FreeBSD systems
      
      * This commit should fix issue #1578
      f16672e5
    • Brad Davis's avatar
      Double the timeout on these two tests in an attempt to give them enough time · 7730555a
      Brad Davis authored
      to pass on ARM.
      
      Requested by swills@
      7730555a
    • Brad Davis's avatar
      f2cf9af0
    • Brad Davis's avatar
      0df01e34
    • Renato Botelho's avatar
      Silently return when obj is NULL · 80a45efb
      Renato Botelho authored
      pkg_repo_load_fingerprints_from_path() attempts to read all files on
      path using pkg_repo_load_fingerprint(). When a file is empty
      ucl_parser_get_object() will return NULL and the attempt to access
      obj->type crashes pkg
      
      Obtained from:	pfSense
      Sponsored by:	Rubicon Communications, LLC (Netgate)
      80a45efb
  6. 08 Apr, 2017 2 commits
  7. 26 Mar, 2017 5 commits