Giter Site home page Giter Site logo

openbsd-module-ports's Introduction

openbsd-module-ports

A set of helpers for help in creating and updating OpenBSD ports for things supported by portgen(1).

WORKFLOW

The way I use this currently is to update my perl ports. This assumes you have a current system with /usr/ports checked out and up to date and have created /usr/ports/mystuff.

It assumes you are doing this on a dedicated machine (or possibly in a chroot) because it expects to be able to pkg_delete all packages to test that things work with only specified dependencies.

  • bin/get_outdated

    • You will need to update the script with your portroach MAINTAINER address
  • bin/get_outdated | sed -n 's/: .*//; s/^p5-/p5 /p' | xargs -n 2 /usr/ports/infrastructure/bin/portgen

    • This creates updated ports in /usr/ports/mystuff
    • I often create /usr/ports/mystuff-$( date +%Y-%d-%m) and symlink that to mystuff
  • cd /usr/ports/mystuff

  • openbsd-module-ports/bin/updated_depends | sed -e 's/^/[ ] /' | tee -a TODO

    • This script looks at all the ports that have been created or updates
    • checks their dependencies and sorts them
    • Ports that depend on others in the list come before them.
    • You can then start at the bottom of the list and work your way up.
  • openbsd-module-ports/bin/remove_unchanged_orig

    • Removes the .orig file for any PLIST's that haven't changed
  • Pick a port you want to work on, likely the last in the list, and cd there

  • I check diff pkg/PLIST.orig pkg/PLIST to see what has changed

    • fixing as appropriate
  • Then diff Makefile.orig Makefile to see what the automatic updater did wrong

    • fixing as appropriate
  • At this point the port should ideally be the way you want to share it.

    • Using tools like /usr/ports/infrastructure/bin/portcheck
  • pkg_delete -XI

    • to verify that all dependencies are listed.
  • I then run make test and make sure that all tests run and pass

    • adding TEST_DEPENDS += ... if there are skipped tests due to optional modules
  • openbsd-module-ports/bin/test_reverse_both

    • THIS SCRIPT WILL RUN pkg_delete TO REMOVE ALL PACKAGES
    • This script builds sqlports and queries it to find the reverse dependencies for your port
    • It then runs the test suite for all those reverse dependencies
    • for both the current port in mystuff as well as the one in /usr/ports
    • writing the results to an reverse_depends_results file in each port
    • If you diff these files you can compare the test run results
    • I often grep the diff output for Result or Tests for a summary
  • Look at the files you have and make sure they all look right

    • less $( find . ( -type d -a -name CVS -prune ) -o -type f -print )
  • openbsd-module-ports/bin/mail_port_diff

    • A slight misnomer as it will actually mail a brand-new port as well
    • sends the mail to $USER so expects that you have a working ~/.forward
    • You can then forward this mail with any additional notes to [email protected]
  • Once the port is approve and committed, you can then remove the directory.

    • and cvs up in /usr/ports

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.