• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

22.01 / 2.6 - gitsync, pulling patches, knowing if a patch is installed etc.

Scheduled Pinned Locked Moved Development
4 Posts 2 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L
    luckman212 LAYER 8
    last edited by luckman212 Nov 29, 2021, 9:06 PM Nov 29, 2021, 9:05 PM

    I've been out of the loop for a bit and trying to get back on the development edge. I used to use gitsync to sync up with recent commits between releases. When I looked at the code in /etc/phpshellsessions/gitsync from my up-to-date 22.01.a.20211128.0600 test box, it seems possibly out of date - example, it still references 21.09, not 22.01. So I wasn't sure it was "safe" to run.

    E.g I wanted to check if a recent fix from vktg (332052b) had already been pulled in... is there any way to do that from the shell?

    I ended up just installing System Patches, putting the commit hash in there and hitting Test, but that seems a bit convoluted and I'm guessing there's a better way to do it (from the console) ?

    J 1 Reply Last reply Nov 30, 2021, 2:38 PM Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate @luckman212
      last edited by Nov 30, 2021, 2:38 PM

      @luckman212 said in 22.01 / 2.6 - gitsync, pulling patches, knowing if a patch is installed etc.:

      I've been out of the loop for a bit and trying to get back on the development edge. I used to use gitsync to sync up with recent commits between releases. When I looked at the code in /etc/phpshellsessions/gitsync from my up-to-date 22.01.a.20211128.0600 test box, it seems possibly out of date - example, it still references 21.09, not 22.01. So I wasn't sure it was "safe" to run.

      Plus can't properly gitsync since the code repository isn't public. That's something we do hope to solve eventually, but it's not a priority.

      E.g I wanted to check if a recent fix from vktg (332052b) had already been pulled in... is there any way to do that from the shell?

      You could fetch the diff manually and check the files with something like patch and its dry run option and then check the output, that's what the system patches GUI package does.

      I ended up just installing System Patches, putting the commit hash in there and hitting Test, but that seems a bit convoluted and I'm guessing there's a better way to do it (from the console) ?

      That's really the best way to do it in an automated fashion.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      L 2 Replies Last reply Nov 30, 2021, 2:54 PM Reply Quote 0
      • L
        luckman212 LAYER 8 @jimp
        last edited by Nov 30, 2021, 2:54 PM

        @jimp Ok thanks for the confirmation. Makes sense that gitsync won't work with a private repo. Bit of a shame but at least I understand now.

        1 Reply Last reply Reply Quote 0
        • L
          luckman212 LAYER 8 @jimp
          last edited by Dec 2, 2021, 4:29 AM

          I made a simple script to check if patches are applicable from the console. It's completely non-destructive (checks only).

          GitHub gist: ptest.sh

          Get

          • save to your box with fetch -o /root/ptest.sh https://gist.githubusercontent.com/luckman212/f58329c5c0e98d38154bcab910783f30/raw/48b82380572fb70de314bb463c279457077506c4/ptest.sh
          • make executable: chmod +x /root/ptest.sh

          Run

          ./ptest.sh [-r] <commit-hash>

          Sample output

          [22.01-DEVELOPMENT][root@pfSense.home.arpa]/root: ./ptest 332052b8bd2a5d35662be2dba773b7a9f0d50681
          
            commit: https://github.com/pfsense/pfsense/commit/332052b8bd2a5d35662be2dba773b7a9f0d50681
           subject: Static routes handling update. Fixes #11599 #11895 #7547
            result: patch CAN be cleanly applied
          
          1 Reply Last reply Reply Quote 1
          4 out of 4
          • First post
            4/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received