update 2024-12-04 10:18:35
This commit is contained in:
parent
ea37b1ce6f
commit
f24f4b4a6b
3
packages/.vscode/settings.json
vendored
Normal file
3
packages/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"git.alwaysSignOff": true
|
||||||
|
}
|
220
packages/CONTRIBUTING.md
Normal file
220
packages/CONTRIBUTING.md
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
# Contributing Guidelines
|
||||||
|
|
||||||
|
Ref: <https://openwrt.org/docs/guide-developer/packages> for overall format and construction
|
||||||
|
|
||||||
|
## Basic guidelines
|
||||||
|
|
||||||
|
All packages you commit or submit by pull-request should follow these simple
|
||||||
|
guidelines:
|
||||||
|
|
||||||
|
- Package a version which is still maintained by the upstream author and will
|
||||||
|
be updated regularly with supported versions.
|
||||||
|
- Have no dependencies outside the OpenWrt core packages or this repository
|
||||||
|
feed.
|
||||||
|
- Have been tested to compile with the correct includes and dependencies.
|
||||||
|
Please also test with "Compile with full language support" found under
|
||||||
|
"General Build Settings" set if language support is relevant to your package.
|
||||||
|
- Best of all -- it works as expected!
|
||||||
|
|
||||||
|
## Package Sources (archives and repositories)
|
||||||
|
|
||||||
|
- PKG_SOURCE should reference the smallest available archive. In order of
|
||||||
|
preference: xz (most compressed), bzip2, gz and zip. As a last resort,
|
||||||
|
downloads from source repositories can be used.
|
||||||
|
- PKG_SOURCE_URL should link to an official release archive. Use of HTTPS:
|
||||||
|
is preferred. If a source archive is not available, a locally generated
|
||||||
|
archive fetched using git, svn, cvs or in rare circumstances, hg or bzr.
|
||||||
|
- Convenience macros for popular mirrors are defined. Using these macros will
|
||||||
|
make your package downloads more robust by mapping to a list of possible
|
||||||
|
source mirrors for archive availability.
|
||||||
|
- @SF - SourceForge (downloads.sourceforge.net) with 5 retries due to
|
||||||
|
re-directs
|
||||||
|
- @GITHUB - GitHub (raw.githubusercontent.com) with 5 retries due to
|
||||||
|
re-directs
|
||||||
|
- @GNU - 8 regional servers
|
||||||
|
- @GNOME - 8 regional servers
|
||||||
|
- @SAVANNAH - 8 regional servers
|
||||||
|
- @APACHE - 8 regional servers
|
||||||
|
- @KERNEL - Linux kernel archives & mirrors
|
||||||
|
- Please _DO NOT_ use an archive which changes over time. A version labeled
|
||||||
|
"latest" is not constant each download. Also, using the head of a branch will
|
||||||
|
create unpredictable results which can be different each build.
|
||||||
|
|
||||||
|
### Makefile contents should contain
|
||||||
|
|
||||||
|
- Provide an up-to-date Copyright notice or **none**. Copyright should not be
|
||||||
|
assigned to OpenWrt unless you are explicitly requested by or working under
|
||||||
|
contract to OpenWrt. Assigning a Copyright to yourself or organization you
|
||||||
|
represent is acceptable.
|
||||||
|
- A (PKG\_)MAINTAINER definition listing either yourself and/or another person
|
||||||
|
responsible for this package (E.g.: PKG_MAINTAINER:= Joe D. Hacker
|
||||||
|
`<jdh@jdhs-email-provider.org`>). Listing multiple maintainers is encouraged in
|
||||||
|
order to keep the package active and up-to-date. Leaving this blank will also
|
||||||
|
be accepted, however the review process may not be as quick as one with a
|
||||||
|
maintainer.
|
||||||
|
- A PKG_LICENSE tag declaring the main license of the package. (E.g.:
|
||||||
|
PKG_LICENSE:=GPL-2.0-or-later) Please use SPDX identifiers if possible (see
|
||||||
|
list at the bottom).
|
||||||
|
- An optional PKG_LICENSE_FILES tag including the filenames of the
|
||||||
|
license-files in the source-package. (E.g.: PKG_LICENSE_FILES:=COPYING)
|
||||||
|
- PKG_RELEASE should be initially set to 1 or reset to 1 if the software
|
||||||
|
version is changed. You should increment it if the package itself has
|
||||||
|
changed. For example, modifying a support script, changing configure options
|
||||||
|
like --disable_ or --enable\_ switches, or if you changed something in the
|
||||||
|
package which causes the resulting binaries to be different. Changes like
|
||||||
|
correcting md5sums, changing mirror URLs, adding a maintainer field or updating
|
||||||
|
a comment or copyright year in a Makefile do not require a change to
|
||||||
|
PKG_RELEASE.
|
||||||
|
- Avoid reuse of PKG_NAME in call, define and eval lines to improve
|
||||||
|
readability.
|
||||||
|
|
||||||
|
### Commits in your pull-requests should
|
||||||
|
|
||||||
|
- Have a useful commit subject prefixed with the package name (E.g.: "foopkg:
|
||||||
|
Add libzot dependency").
|
||||||
|
- Include Signed-off-by tag in the commit comments. See: [Sign your
|
||||||
|
work](https://openwrt.org/submitting-patches#sign_your_work)
|
||||||
|
- Author and sign-off must match and be a real name or known identity and
|
||||||
|
a real email address. GitHub private email addresses will not be accepted.
|
||||||
|
- Follow all [Submission Guidelines](https://openwrt.org/submitting-patches#submission_guidelines)
|
||||||
|
requirements, including maximum characters per line.
|
||||||
|
|
||||||
|
## Advice on pull requests
|
||||||
|
|
||||||
|
Pull requests are the easiest way to contribute changes to git repos at GitHub.
|
||||||
|
They are the preferred contribution method, as they offer a nice way for
|
||||||
|
commenting and amending the proposed changes.
|
||||||
|
|
||||||
|
- You need a local "fork" of the GitHub repo.
|
||||||
|
|
||||||
|
- Use a "feature branch" for your changes. That separates the changes in the
|
||||||
|
pull request from your other changes and makes it easy to edit/amend commits
|
||||||
|
in the pull request. Workflow using "feature_x" as the example:
|
||||||
|
- Update your local git fork to the tip (of the master, usually)
|
||||||
|
- Create the feature branch with `git checkout -b feature_x`
|
||||||
|
- Edit changes and commit them locally
|
||||||
|
- Push them to your GitHub fork by `git push -u origin feature_x`. That
|
||||||
|
creates the "feature_x" branch at your GitHub fork and sets it as the
|
||||||
|
remote of this branch
|
||||||
|
- When you now visit GitHub, you should see a proposal to create a pull
|
||||||
|
request
|
||||||
|
|
||||||
|
- If you later need to add new commits to the pull request, you can simply
|
||||||
|
commit the changes to the local branch and then use `git push` to
|
||||||
|
automatically update the pull request.
|
||||||
|
|
||||||
|
- If you need to change something in the existing pull request (e.g. to add a
|
||||||
|
missing signed-off-by line to the commit message), you can use `git push -f`
|
||||||
|
to overwrite the original commits. That is easy and safe when using a feature
|
||||||
|
branch. Example workflow:
|
||||||
|
- Checkout the feature branch by `git checkout feature_x`
|
||||||
|
- Edit changes and commit them locally. If you are just updating the commit
|
||||||
|
message in the last commit, you can use `git commit --amend` to do that
|
||||||
|
- If you added several new commits or made other changes that require
|
||||||
|
cleaning up, you can use `git rebase -i HEAD~X` (X = number of commits to
|
||||||
|
edit) to possibly squash some commits
|
||||||
|
- Push the changed commits to GitHub with `git push -f` to overwrite the
|
||||||
|
original commits in the "feature_x" branch with the new ones. The pull
|
||||||
|
request gets automatically updated
|
||||||
|
|
||||||
|
## If you have commit access
|
||||||
|
|
||||||
|
- Do NOT use git push --force.
|
||||||
|
- Do NOT commit to other maintainer's packages without their consent.
|
||||||
|
- Use Pull Requests if you are unsure and to suggest changes to other
|
||||||
|
maintainers.
|
||||||
|
|
||||||
|
### Gaining commit access
|
||||||
|
|
||||||
|
- We will gladly grant commit access to responsible contributors who have made
|
||||||
|
useful pull requests and / or feedback or patches to this repository or
|
||||||
|
OpenWrt in general. Please include your request for commit access in your next
|
||||||
|
pull request or ticket.
|
||||||
|
|
||||||
|
## Release Branches
|
||||||
|
|
||||||
|
- Old stable branches were named after the following pattern "for-XX.YY" (e.g.
|
||||||
|
for-14.07) before the LEDE split. During the LEDE split there was only one
|
||||||
|
release branch with the name "lede-17.01". After merging the LEDE fork with
|
||||||
|
OpenWrt the release branches are named according to the following pattern
|
||||||
|
"openwrt-XX.YY" (e.g. openwrt-18.06).
|
||||||
|
- These branches are built with the respective OpenWrt release and are created
|
||||||
|
during the release stabilisation phase.
|
||||||
|
- Please ONLY cherry-pick or commit security and bug-fixes to these branches.
|
||||||
|
- Do NOT add new packages and do NOT do major upgrades of packages here.
|
||||||
|
- If you are unsure if your change is suitable, please use a pull request.
|
||||||
|
|
||||||
|
## Common LICENSE tags (short list)
|
||||||
|
|
||||||
|
(Complete list can be found at: <https://spdx.org/licenses>)
|
||||||
|
|
||||||
|
| Full Name | Identifier |
|
||||||
|
| ------------------------------------------------ | :----------------------- |
|
||||||
|
| Apache License 1.0 | Apache-1.0 |
|
||||||
|
| Apache License 1.1 | Apache-1.1 |
|
||||||
|
| Apache License 2.0 | Apache-2.0 |
|
||||||
|
| Artistic License 1.0 | Artistic-1.0 |
|
||||||
|
| Artistic License 1.0 w/clause 8 | Artistic-1.0-cl8 |
|
||||||
|
| Artistic License 1.0 (Perl) | Artistic-1.0-Perl |
|
||||||
|
| Artistic License 2.0 | Artistic-2.0 |
|
||||||
|
| BSD 2-Clause "Simplified" License | BSD-2-Clause |
|
||||||
|
| BSD 2-Clause FreeBSD License | BSD-2-Clause-FreeBSD |
|
||||||
|
| BSD 2-Clause NetBSD License | BSD-2-Clause-NetBSD |
|
||||||
|
| BSD 3-Clause "New" or "Revised" License | BSD-3-Clause |
|
||||||
|
| BSD with attribution | BSD-3-Clause-Attribution |
|
||||||
|
| BSD 3-Clause Clear License | BSD-3-Clause-Clear |
|
||||||
|
| BSD 4-Clause "Original" or "Old" License | BSD-4-Clause |
|
||||||
|
| BSD-4-Clause (University of California-Specific) | BSD-4-Clause-UC |
|
||||||
|
| BSD Protection License | BSD-Protection |
|
||||||
|
| GNU General Public License v1.0 only | GPL-1.0-only |
|
||||||
|
| GNU General Public License v1.0 or later | GPL-1.0-or-later |
|
||||||
|
| GNU General Public License v2.0 only | GPL-2.0-only |
|
||||||
|
| GNU General Public License v2.0 or later | GPL-2.0-or-later |
|
||||||
|
| GNU General Public License v3.0 only | GPL-3.0-only |
|
||||||
|
| GNU General Public License v3.0 or later | GPL-3.0-or-later |
|
||||||
|
| GNU Lesser General Public License v2.1 only | LGPL-2.1-only |
|
||||||
|
| GNU Lesser General Public License v2.1 or later | LGPL-2.1-or-later |
|
||||||
|
| GNU Lesser General Public License v3.0 only | LGPL-3.0-only |
|
||||||
|
| GNU Lesser General Public License v3.0 or later | LGPL-3.0-or-later |
|
||||||
|
| GNU Library General Public License v2 only | LGPL-2.0-only |
|
||||||
|
| GNU Library General Public License v2 or later | LGPL-2.0-or-later |
|
||||||
|
| Fair License | Fair |
|
||||||
|
| ISC License | ISC |
|
||||||
|
| MIT License | MIT |
|
||||||
|
| No Limit Public License | NLPL |
|
||||||
|
| OpenSSL License | OpenSSL |
|
||||||
|
| X11 License | X11 |
|
||||||
|
| zlib License | Zlib |
|
||||||
|
|
||||||
|
## Continuous Integration
|
||||||
|
|
||||||
|
To simplify review and require less human resources, a CI tests all packages.
|
||||||
|
Passing CI tests are not a hard requirement but a good indicator what the
|
||||||
|
Buildbots will think about the proposed patch.
|
||||||
|
|
||||||
|
The CI builds modified packages for multiple architectures using the latest
|
||||||
|
snapshot SDK. For supported architectures (`aarch64_generic`,
|
||||||
|
`arm_cortex-a15_neon-vfpv4`, `i386_pentium4` and `x86_64`) an additional
|
||||||
|
runtime test is executed. A running OpenWrt is simulated which tries to install
|
||||||
|
created packages and runs a script called `test.sh` located next to the package
|
||||||
|
Makefile. The script is executed with the two arguments `PKG_NAME` and
|
||||||
|
`PKG_VERSION`. The `PKG_NAME` can be used to distinguish package variants, e.g.
|
||||||
|
`foobar` vs. `foobar-full`. The `PKG_VERSION` can be used for a trivial test
|
||||||
|
checking if `foobar --version` prints the correct version.
|
||||||
|
|
||||||
|
The following snippet shows a script that tests different binaries depending on
|
||||||
|
what IPK package was installed. The `gpsd` Makefile produces both a `gpsd` and
|
||||||
|
a `gpsd-clients` IPK packages.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
"gpsd")
|
||||||
|
gpsd -V 2>&1 | grep "$2"
|
||||||
|
;;
|
||||||
|
"gpsd-clients")
|
||||||
|
cgps -V 2>&1 | grep "$2"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
```
|
340
packages/LICENSE
Normal file
340
packages/LICENSE
Normal file
@ -0,0 +1,340 @@
|
|||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
26
packages/README.md
Normal file
26
packages/README.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# OpenWrt packages feed
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This is the OpenWrt "packages"-feed containing community-maintained build scripts, options and patches for applications, modules and libraries used within OpenWrt.
|
||||||
|
|
||||||
|
Installation of pre-built packages is handled directly by the **opkg** utility within your running OpenWrt system or by using the [OpenWrt SDK](https://openwrt.org/docs/guide-developer/using_the_sdk) on a build system.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
This repository is intended to be layered on-top of an OpenWrt buildroot. If you do not have an OpenWrt buildroot installed, see the documentation at: [OpenWrt Buildroot – Installation](https://openwrt.org/docs/guide-developer/build-system/install-buildsystem) on the OpenWrt support site.
|
||||||
|
|
||||||
|
This feed is enabled by default. To install all its package definitions, run:
|
||||||
|
```
|
||||||
|
./scripts/feeds update packages
|
||||||
|
./scripts/feeds install -a -p packages
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
See [LICENSE](LICENSE) file.
|
||||||
|
|
||||||
|
## Package Guidelines
|
||||||
|
|
||||||
|
See [CONTRIBUTING.md](CONTRIBUTING.md) file.
|
||||||
|
|
53
packages/admin/atop/Makefile
Normal file
53
packages/admin/atop/Makefile
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
|
||||||
|
PKG_NAME:=atop
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_VERSION:=2.11.0
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://www.atoptool.nl/download/
|
||||||
|
PKG_HASH:=9b94c666602efff7bf402ecce706c347f38c39cb63498f9d39626861e5646e20
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
|
||||||
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:atop_project:atop
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/atop
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=System and process monitor for Linux
|
||||||
|
DEPENDS:=+zlib +libncurses +glib2
|
||||||
|
URL:=https://www.atoptool.nl/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/atop/description
|
||||||
|
Atop is an ASCII full-screen performance monitor for
|
||||||
|
Linux that is capable of reporting the activity of all
|
||||||
|
processes (even if processes have finished during the
|
||||||
|
interval), daily logging of system and process activity
|
||||||
|
for long-term analysis, highlighting overloaded system
|
||||||
|
resources by using colors, etcetera. At regular
|
||||||
|
intervals, it shows system-level activity related to the
|
||||||
|
CPU, memory, swap, disks (including LVM) and network
|
||||||
|
layers, and for every process (and thread) it shows e.g.
|
||||||
|
the CPU utilization, memory growth, disk utilization,
|
||||||
|
priority, username, state, and exit code. In combination
|
||||||
|
with the optional kernel module netatop, it even shows
|
||||||
|
network activity per process/thread.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/atop/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/atop $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,atop))
|
69
packages/admin/backuppc/Makefile
Normal file
69
packages/admin/backuppc/Makefile
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
# Copyright (C) 2018 OpenWrt
|
||||||
|
#
|
||||||
|
# Ideas used from the backuppc packaging in Debian GNU/Linux
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=backuppc
|
||||||
|
PKG_VERSION:=3.3.2
|
||||||
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
|
PKG_SOURCE:=BackupPC-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=@SF/backuppc
|
||||||
|
PKG_HASH:=fbade2c8d8039297e826a75d2c39d5ac9a6f66e0c84c0cf8c4cef0bcf64d2152
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/BackupPC-$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Carsten Wolff <carsten@wolffcarsten.de>
|
||||||
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/backuppc
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=high-performance, enterprise-grade system for backing up PCs
|
||||||
|
URL:=https://sourceforge.net/projects/backuppc/
|
||||||
|
DEPENDS:=+perl +perl-www +perl-cgi +perlbase-digest +perlbase-compress +perlbase-archive +perlbase-data +perlbase-storable +perlbase-getopt +perl-file-rsyncp +openssh-client +tar +bzip2 +samba4-client +rsync +iputils-ping
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/backuppc/description
|
||||||
|
BackupPC is a disk based backup system featuring a clever pooling scheme and
|
||||||
|
compression to minimize disk storage and disk I/O. It can use SMB, rsync or tar
|
||||||
|
to access the clients without any additional client software and offers a
|
||||||
|
powerful http/cgi user interface.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
true
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -Wall -o $(PKG_BUILD_DIR)/BackupPC_Admin ./files/setuidwrapper.c
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/backuppc/install
|
||||||
|
$(INSTALL_DIR) $(strip $(1))/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/backuppc.init $(strip $(1))/etc/init.d/backuppc
|
||||||
|
cd $(PKG_BUILD_DIR) && ./configure.pl --batch --html-dir-url=/backuppc/ \
|
||||||
|
--html-dir=/www/backuppc/ --cgi-dir=/www/cgi-bin/ --no-fhs --uid-ignore \
|
||||||
|
--dest-dir=$(strip $(1)) --install-dir /usr/share/backuppc \
|
||||||
|
--hostname=XXXXXX --data-dir=/data/backuppc --log-dir=/data/backuppc/log \
|
||||||
|
--bin-path perl=/usr/bin/perl --bin-path tar=/bin/tar \
|
||||||
|
--bin-path smbclient=/usr/sbin/smbclient --bin-path nmblookup=/usr/sbin/nmblookup \
|
||||||
|
--bin-path rsync=/usr/bin/rsync --bin-path ping=/usr/bin/ping --bin-path df=/bin/df \
|
||||||
|
--bin-path ssh=/usr/bin/ssh --bin-path gzip=/bin/gzip \
|
||||||
|
--bin-path sendmail=/usr/sbin/sendmail --bin-path bzip2=/usr/bin/bzip2 \
|
||||||
|
--bin-path par2=
|
||||||
|
$(INSTALL_DIR) $(strip $(1))/usr/share/backuppc/conf
|
||||||
|
chmod 755 $(strip $(1))/data
|
||||||
|
mv $(strip $(1))/data/backuppc/conf/config.pl $(strip $(1))/usr/share/backuppc/conf/config.pl
|
||||||
|
patch --no-backup-if-mismatch $(strip $(1))/usr/share/backuppc/conf/config.pl ./files/fixup-config-pl.patch
|
||||||
|
mv $(strip $(1))/www/cgi-bin/BackupPC_Admin $(strip $(1))/usr/share/backuppc/bin/BackupPC_Admin_real
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/BackupPC_Admin $(strip $(1))/www/cgi-bin/BackupPC_Admin
|
||||||
|
$(INSTALL_DIR) $(strip $(1))/lib/upgrade/keep.d
|
||||||
|
$(INSTALL_DATA) files/backuppc.upgrade $(strip $(1))/lib/upgrade/keep.d/backuppc
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,backuppc))
|
66
packages/admin/backuppc/files/backuppc.init
Normal file
66
packages/admin/backuppc/files/backuppc.init
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
. /lib/functions.sh
|
||||||
|
|
||||||
|
START=95
|
||||||
|
STOP=10
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
BACKUPPC_BIN="/usr/share/backuppc/bin/BackupPC"
|
||||||
|
BACKUPPC_USER=backuppc
|
||||||
|
|
||||||
|
# it would be better if it was possible to do this at install time, but we
|
||||||
|
# can't, because in case of an openwrt image bundled with backuppc, all
|
||||||
|
# ownerships other than root are lost.
|
||||||
|
preconfigure() {
|
||||||
|
# create backuppc group and user if needed
|
||||||
|
if ! group_exists backuppc; then
|
||||||
|
group_add backuppc 864
|
||||||
|
fi
|
||||||
|
if ! user_exists backuppc; then
|
||||||
|
user_add backuppc 864 864 "BackupPC user" /data/backuppc /bin/sh
|
||||||
|
fi
|
||||||
|
# install default config if none exists, yet
|
||||||
|
if [ ! -e /data/backuppc/conf/config.pl ]; then
|
||||||
|
cp /usr/share/backuppc/conf/config.pl /data/backuppc/conf/config.pl
|
||||||
|
fi
|
||||||
|
# ensure proper ownerships and rights
|
||||||
|
chown backuppc:backuppc /data/backuppc /data/backuppc/* \
|
||||||
|
/www/cgi-bin/BackupPC_Admin
|
||||||
|
chmod 750 /data/backuppc /data/backuppc/*
|
||||||
|
chmod 755 /usr/share/backuppc/bin/BackupPC_Admin_real
|
||||||
|
# The CGI needs to be world-executable, because uhttpd-cgi.c:386 checks
|
||||||
|
# for exactly that. We don't want that, but can't avoid it, currently.
|
||||||
|
chmod 6751 /www/cgi-bin/BackupPC_Admin
|
||||||
|
chown -R :backuppc /data/backuppc/conf
|
||||||
|
chmod 2770 /data/backuppc/conf
|
||||||
|
# protect webinterface with a random password by default
|
||||||
|
if [ -x /usr/sbin/uhttpd ] && ! grep -q backuppc /etc/httpd.conf >/dev/null 2>&1; then
|
||||||
|
PASS=$(perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..8)')
|
||||||
|
PASSHASH=$(/usr/sbin/uhttpd -m "${PASS}")
|
||||||
|
echo "/cgi-bin/BackupPC_Admin:backuppc:${PASSHASH}" >> /etc/httpd.conf
|
||||||
|
uci set uhttpd.main.config=/etc/httpd.conf
|
||||||
|
/etc/init.d/uhttpd restart
|
||||||
|
# inform user
|
||||||
|
echo
|
||||||
|
echo "To protect access to the backuppc web interface, HTTP basic authentication in"
|
||||||
|
echo "uhttpd for http://$(/sbin/uci get "system.@system[0].hostname")/cgi-bin/BackupPC_Admin has been configured:"
|
||||||
|
echo "user: backuppc"
|
||||||
|
echo "pass: ${PASS}"
|
||||||
|
echo
|
||||||
|
echo "It is also recommended to follow the steps in"
|
||||||
|
echo "https://openwrt.org/docs/guide-user/services/webserver/uhttpd#securing_uhttpd"
|
||||||
|
echo "to secure access to uhttpd."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
# don't run preconfigure steps if called during image build
|
||||||
|
if [ -z "${IPKG_INSTROOT}" ]; then
|
||||||
|
preconfigure
|
||||||
|
fi
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param user $BACKUPPC_USER
|
||||||
|
procd_set_param reload_signal 1
|
||||||
|
procd_set_param command $BACKUPPC_BIN
|
||||||
|
}
|
2
packages/admin/backuppc/files/backuppc.upgrade
Normal file
2
packages/admin/backuppc/files/backuppc.upgrade
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/etc/httpd.conf
|
||||||
|
/data/backuppc/conf/
|
67
packages/admin/backuppc/files/fixup-config-pl.patch
Normal file
67
packages/admin/backuppc/files/fixup-config-pl.patch
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
--- config.pl 2018-03-11 09:30:28.000000000 +0100
|
||||||
|
+++ config.pl.new 2018-04-05 08:40:29.180000000 +0200
|
||||||
|
@@ -41,7 +41,10 @@
|
||||||
|
#
|
||||||
|
# Host name on which the BackupPC server is running.
|
||||||
|
#
|
||||||
|
-$Conf{ServerHost} = 'XXXXXX';
|
||||||
|
+$ENV{'PATH'} = '/bin:/usr/bin';
|
||||||
|
+delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
|
||||||
|
+$Conf{ServerHost} = $ENV{'HOSTNAME'};
|
||||||
|
+chomp($Conf{ServerHost});
|
||||||
|
|
||||||
|
#
|
||||||
|
# TCP port number on which the BackupPC server listens for and accepts
|
||||||
|
@@ -223,7 +226,7 @@
|
||||||
|
#
|
||||||
|
# Full path to various commands for archiving
|
||||||
|
#
|
||||||
|
-$Conf{SplitPath} = '/usr/bin/split';
|
||||||
|
+$Conf{SplitPath} = '/usr/bin/split' if ( -x '/usr/bin/split' );
|
||||||
|
$Conf{ParPath} = '';
|
||||||
|
$Conf{CatPath} = '/bin/cat';
|
||||||
|
$Conf{GzipPath} = '/bin/gzip';
|
||||||
|
@@ -1572,7 +1575,7 @@
|
||||||
|
# Full path for ssh. Security caution: normal users should not
|
||||||
|
# allowed to write to this file or directory.
|
||||||
|
#
|
||||||
|
-$Conf{SshPath} = '/usr/bin/ssh';
|
||||||
|
+$Conf{SshPath} = '/usr/bin/ssh' if ( -x '/usr/bin/ssh' );
|
||||||
|
|
||||||
|
#
|
||||||
|
# Full path for nmblookup. Security caution: normal users should not
|
||||||
|
@@ -1874,7 +1877,7 @@
|
||||||
|
# Full path to the sendmail command. Security caution: normal users
|
||||||
|
# should not allowed to write to this file or directory.
|
||||||
|
#
|
||||||
|
-$Conf{SendmailPath} = '/usr/sbin/sendmail';
|
||||||
|
+$Conf{SendmailPath} = '/usr/sbin/sendmail' if ( -x '/usr/sbin/sendmail' );
|
||||||
|
|
||||||
|
#
|
||||||
|
# Minimum period between consecutive emails to a single user.
|
||||||
|
@@ -2028,13 +2031,13 @@
|
||||||
|
# $Conf{CgiAdminUsers} = 'craig celia';
|
||||||
|
# --> administrative users are only craig and celia'.
|
||||||
|
#
|
||||||
|
-$Conf{CgiAdminUserGroup} = '';
|
||||||
|
-$Conf{CgiAdminUsers} = '';
|
||||||
|
+$Conf{CgiAdminUserGroup} = 'backuppc';
|
||||||
|
+$Conf{CgiAdminUsers} = 'backuppc';
|
||||||
|
|
||||||
|
#
|
||||||
|
# URL of the BackupPC_Admin CGI script. Used for email messages.
|
||||||
|
#
|
||||||
|
-$Conf{CgiURL} = 'http://XXXXXX/cgi-bin//BackupPC_Admin';
|
||||||
|
+$Conf{CgiURL} = 'http://' . $Conf{ServerHost} . '/cgi-bin//BackupPC_Admin';
|
||||||
|
|
||||||
|
#
|
||||||
|
# Language to use. See lib/BackupPC/Lang for the list of supported
|
||||||
|
@@ -2076,7 +2079,7 @@
|
||||||
|
# dates (MM/DD), a value of 2 uses full YYYY-MM-DD format, and zero
|
||||||
|
# for international dates (DD/MM).
|
||||||
|
#
|
||||||
|
-$Conf{CgiDateFormatMMDD} = 1;
|
||||||
|
+$Conf{CgiDateFormatMMDD} = 2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# If set, the complete list of hosts appears in the left navigation
|
8
packages/admin/backuppc/files/setuidwrapper.c
Normal file
8
packages/admin/backuppc/files/setuidwrapper.c
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
execv("/usr/share/backuppc/bin/BackupPC_Admin_real", argv);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
99
packages/admin/backuppc/patches/001-debian-fixes.patch
Normal file
99
packages/admin/backuppc/patches/001-debian-fixes.patch
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
--- a/bin/BackupPC_archive
|
||||||
|
+++ b/bin/BackupPC_archive
|
||||||
|
@@ -299,7 +299,7 @@ sub ArchiveCleanup
|
||||||
|
if ( $NeedPostCmd ) {
|
||||||
|
UserCommandRun("ArchivePostUserCmd");
|
||||||
|
if ( $? && $Conf{UserCmdCheckStatus} ) {
|
||||||
|
- $stat{hostError} = "RestorePreUserCmd returned error status $?";
|
||||||
|
+ $stat{hostError} = "ArchivePostUserCmd returned error status $?";
|
||||||
|
$stat{xferOK} = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--- a/bin/BackupPC_dump
|
||||||
|
+++ b/bin/BackupPC_dump
|
||||||
|
@@ -1067,7 +1067,7 @@ sub catch_signal
|
||||||
|
# Send ALRMs to BackupPC_tarExtract if we are using it
|
||||||
|
#
|
||||||
|
if ( $tarPid > 0 ) {
|
||||||
|
- kill($bpc->sigName2num("ARLM"), $tarPid);
|
||||||
|
+ kill($bpc->sigName2num("ALRM"), $tarPid);
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
--- a/configure.pl
|
||||||
|
+++ b/configure.pl
|
||||||
|
@@ -333,7 +333,10 @@ while ( 1 ) {
|
||||||
|
$Conf{BackupPCUser} || "backuppc",
|
||||||
|
"backuppc-user");
|
||||||
|
if ( $opts{"set-perms"} ) {
|
||||||
|
- ($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser});
|
||||||
|
+ #($name, $passwd, $Uid, $Gid) = getpwnam($Conf{BackupPCUser});
|
||||||
|
+ $name = 'backuppc';
|
||||||
|
+ $Uid=`id -u`;
|
||||||
|
+ $Gid=`id -g`;
|
||||||
|
last if ( $name ne "" );
|
||||||
|
print <<EOF;
|
||||||
|
|
||||||
|
@@ -800,6 +803,7 @@ $Conf{ParPath} = '' if ( $Conf{ParPath}
|
||||||
|
#
|
||||||
|
# Figure out sensible arguments for the ping command
|
||||||
|
#
|
||||||
|
+$Conf{PingArgs} = '-c 1 $host';
|
||||||
|
if ( defined($Conf{PingArgs}) ) {
|
||||||
|
$Conf{PingCmd} = '$pingPath ' . $Conf{PingArgs};
|
||||||
|
} elsif ( !defined($Conf{PingCmd}) ) {
|
||||||
|
--- a/lib/BackupPC/CGI/View.pm
|
||||||
|
+++ b/lib/BackupPC/CGI/View.pm
|
||||||
|
@@ -46,7 +46,7 @@ sub action
|
||||||
|
my $compress = 0;
|
||||||
|
my $fh;
|
||||||
|
my $host = $In{host};
|
||||||
|
- my $num = $In{num};
|
||||||
|
+ my $num = ${EscHTML($In{num})};
|
||||||
|
my $type = $In{type};
|
||||||
|
my $linkHosts = 0;
|
||||||
|
my($file, $comment);
|
||||||
|
@@ -136,6 +136,10 @@ sub action
|
||||||
|
}
|
||||||
|
$s =~ s/[\n\r]+//g;
|
||||||
|
if ( $s =~ /smb: \\>/
|
||||||
|
+ || $s =~ /^tar:\d+\s/
|
||||||
|
+ || $s =~ /^ NTLMSSP_/
|
||||||
|
+ || $s =~ /^GENSEC backend /
|
||||||
|
+ || $s =~ /^doing parameter /
|
||||||
|
|| $s =~ /^\s*(\d+) \(\s*\d+\.\d kb\/s\) (.*)$/
|
||||||
|
|| $s =~ /^tar: dumped \d+ files/
|
||||||
|
|| $s =~ /^\s*added interface/i
|
||||||
|
--- a/lib/BackupPC/Lib.pm
|
||||||
|
+++ b/lib/BackupPC/Lib.pm
|
||||||
|
@@ -512,7 +512,8 @@ sub dirRead
|
||||||
|
}
|
||||||
|
if ( $IODirentOk ) {
|
||||||
|
@entries = sort({ $a->{inode} <=> $b->{inode} } readdirent($fh));
|
||||||
|
- map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
|
||||||
|
+ #map { $_->{type} = 0 + $_->{type} } @entries; # make type numeric
|
||||||
|
+ map { $_->{type} = 0 + $_->{type}; $_->{type} = undef if ($_->{type} eq BPC_DT_UNKNOWN); } @entries; # make type numeric, unset unknown types
|
||||||
|
} else {
|
||||||
|
@entries = map { { name => $_} } readdir($fh);
|
||||||
|
}
|
||||||
|
--- a/lib/BackupPC/Xfer/Smb.pm
|
||||||
|
+++ b/lib/BackupPC/Xfer/Smb.pm
|
||||||
|
@@ -219,7 +219,7 @@ sub readOutput
|
||||||
|
#
|
||||||
|
# MAKSYM 14082016: The next regex will never match on Samba-4.3, as
|
||||||
|
# smbclient doesn't produce output required; keeping it for older Sambas
|
||||||
|
- if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ ) {
|
||||||
|
+ if ( /^\s*(-?\d+) \(\s*\d+[.,]\d kb\/s\) (.*)$/ || /^tar:(\d+)\s+\+\+\+ (.*)$/ ) {
|
||||||
|
my $sambaFileSize = $1;
|
||||||
|
my $pcFileName = $2;
|
||||||
|
(my $fileName = $pcFileName) =~ s/\\/\//g;
|
||||||
|
@@ -281,6 +281,9 @@ sub readOutput
|
||||||
|
} elsif ( /smb: \\>/
|
||||||
|
|| /^\s*tar:\d+/ # MAKSYM 14082016: ignoring 2 more Samba-4.3 specific lines
|
||||||
|
|| /^\s*WARNING:/i
|
||||||
|
+ || /^ NTLMSSP_/
|
||||||
|
+ || /^GENSEC backend /
|
||||||
|
+ || /^doing parameter /
|
||||||
|
|| /^\s*added interface/i
|
||||||
|
|| /^\s*tarmode is now/i
|
||||||
|
|| /^\s*Total bytes written/i
|
39
packages/admin/bottom/Makefile
Normal file
39
packages/admin/bottom/Makefile
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
#
|
||||||
|
# Copyright (C) 2023 Luca Barbato
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=bottom
|
||||||
|
PKG_VERSION:=0.9.7
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/ClementTsang/bottom/tar.gz/$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=29c3f75323ae0245576ea23268bb0956757352bf3b16d05f511357655b9cc71e
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Luca Barbato <lu_zero@luminem.org>
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=rust/host
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include ../../lang/rust/rust-package.mk
|
||||||
|
|
||||||
|
define Package/bottom
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Interactive processes viewer
|
||||||
|
DEPENDS:=$(RUST_ARCH_DEPENDS)
|
||||||
|
URL:=https://github.com/ClementTsang/bottom
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/bottom/description
|
||||||
|
A customizable cross-platform graphical process/system monitor
|
||||||
|
for the terminal.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call RustBinPackage,bottom))
|
||||||
|
$(eval $(call BuildPackage,bottom))
|
52
packages/admin/btop/Makefile
Normal file
52
packages/admin/btop/Makefile
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=btop
|
||||||
|
PKG_VERSION:=1.4.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL=https://codeload.github.com/aristocratos/btop/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=ac0d2371bf69d5136de7e9470c6fb286cbee2e16b4c7a6d2cd48a14796e86650
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||||
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
PKG_BUILD_FLAGS:=no-lto
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/btop
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=A monitor of resources
|
||||||
|
URL:=https://github.com/aristocratos/btop
|
||||||
|
DEPENDS:=+libstdcpp
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/btop/description
|
||||||
|
Resource monitor that shows usage and stats for processor, memory,
|
||||||
|
disks, network and processes.
|
||||||
|
|
||||||
|
C++ version and continuation of bashtop and bpytop.
|
||||||
|
endef
|
||||||
|
|
||||||
|
BTOP_LDFLAGS:=-pthread -DFMT_HEADER_ONLY -D_FILE_OFFSET_BITS=64
|
||||||
|
MAKE_FLAGS+= \
|
||||||
|
PLATFORM=Linux \
|
||||||
|
OPTFLAGS="$(TARGET_CXXFLAGS)" \
|
||||||
|
LDCXXFLAGS="$(TARGET_LDFLAGS) $(BTOP_LDFLAGS)"
|
||||||
|
|
||||||
|
define Package/btop/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/local/bin/btop $(1)/usr/bin/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/local/share/btop $(1)/usr/share/
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/etc/profile.d
|
||||||
|
$(CP) $(CURDIR)/files/btop.sh $(1)/etc/profile.d/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,btop))
|
1
packages/admin/btop/files/btop.sh
Normal file
1
packages/admin/btop/files/btop.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
alias btop="btop --utf-force"
|
3
packages/admin/btop/test.sh
Normal file
3
packages/admin/btop/test.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
btop --version | grep "$PKG_VERSION"
|
42
packages/admin/debian-archive-keyring/Makefile
Normal file
42
packages/admin/debian-archive-keyring/Makefile
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
|
PKG_NAME:=debian-archive-keyring
|
||||||
|
PKG_VERSION:=2023.4
|
||||||
|
PKG_HASH:=6e93a87b9e50bd81518880ec07a62f95d7d8452f4aa703f5b0a3076439f1022c
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION)_all.deb
|
||||||
|
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/d/$(PKG_NAME)/
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||||
|
PKG_LICENSE:=Unique
|
||||||
|
PKG_LICENSE_FILES:=usr/share/doc/debian-archive-keyring/copyright
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/debian-archive-keyring
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Debian Archive keyring
|
||||||
|
URL:=https://salsa.debian.org/release-team/debian-archive-keyring
|
||||||
|
PKGARCH:=all
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
$(AR) p $(DL_DIR)/$(PKG_SOURCE) data.tar.xz | $(TAR) -xJC $(PKG_BUILD_DIR)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/debian-archive-keyring/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/keyrings
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/keyrings/*.gpg $(1)/usr/share/keyrings
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,debian-archive-keyring))
|
60
packages/admin/debootstrap/Makefile
Normal file
60
packages/admin/debootstrap/Makefile
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2010 Gianluigi Tiesi <sherpya@netfarm.it>
|
||||||
|
# Copyright (C) 2011-2014 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=debootstrap
|
||||||
|
PKG_REAL_VERSION:=1.0.128+nmu2+deb12u1
|
||||||
|
PKG_VERSION:=1.0.128.2~deb121
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-udeb_$(PKG_REAL_VERSION)_all.udeb
|
||||||
|
PKG_SOURCE_URL:=@DEBIAN/pool/main/d/debootstrap
|
||||||
|
PKG_HASH:=4fa4ec7c144ed047c47d0d8eb9b91b56eaa9b2db2b52510777abbabf5965d268
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
|
||||||
|
PKG_LICENSE:=Unique
|
||||||
|
PKG_LICENSE_FILES:=debian/copyright
|
||||||
|
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REAL_VERSION)
|
||||||
|
|
||||||
|
UNPACK_CMD=ar -p "$(DL_DIR)/$(PKG_SOURCE)" data.tar.xz | xzcat | tar -C $(1) -xf -
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/debootstrap
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Bootstrap a basic Debian system
|
||||||
|
URL:=https://wiki.debian.org/Debootstrap
|
||||||
|
DEPENDS:= +coreutils +coreutils-chroot +coreutils-sha1sum +ar +xz-utils +xz
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/debootstrap/description
|
||||||
|
debootstrap is used to create a Debian base system from scratch, without
|
||||||
|
requiring the availability of dpkg or apt. It does this by downloading .deb
|
||||||
|
files from a mirror site, and carefully unpacking them into a directory which
|
||||||
|
can eventually be chrooted into.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
# file pkgdetails.c was imported from debian package base-installer version 1.130
|
||||||
|
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) ./files/pkgdetails.c -o $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/debootstrap/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/sbin/$(PKG_NAME) $(1)/usr/sbin
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/debootstrap
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/usr/share/debootstrap/pkgdetails $(1)/usr/share/debootstrap
|
||||||
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/usr/share/debootstrap/functions $(1)/usr/share/debootstrap
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/debootstrap/scripts
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/usr/share/debootstrap/scripts/* $(1)/usr/share/debootstrap/scripts
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,debootstrap))
|
348
packages/admin/debootstrap/files/pkgdetails.c
Normal file
348
packages/admin/debootstrap/files/pkgdetails.c
Normal file
@ -0,0 +1,348 @@
|
|||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <errno.h>
|
||||||
|
|
||||||
|
#define MAX_LINE 1000
|
||||||
|
#define MAX_PKGS 100
|
||||||
|
|
||||||
|
char *checksum_field=NULL;
|
||||||
|
|
||||||
|
static void oom_die(void)
|
||||||
|
{
|
||||||
|
fputs("Out of memory!\n", stderr);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *xvasprintf(const char *fmt, va_list ap) {
|
||||||
|
char *ret;
|
||||||
|
|
||||||
|
if (vasprintf (&ret, fmt, ap) < 0) {
|
||||||
|
if (errno == ENOMEM)
|
||||||
|
oom_die();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *xasprintf(const char *fmt, ...) {
|
||||||
|
va_list ap;
|
||||||
|
char *ret;
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
ret = xvasprintf(fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *fieldcpy(char *dst, char *fld) {
|
||||||
|
while (*fld && *fld != ':')
|
||||||
|
fld++;
|
||||||
|
if (!*(fld++))
|
||||||
|
return NULL;
|
||||||
|
while (isspace(*fld)) fld++;
|
||||||
|
return strcpy(dst, fld);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void outputdeps(char *deps) {
|
||||||
|
char *pch = deps;
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
while (isspace(*pch)) pch++;
|
||||||
|
if (!*pch) break;
|
||||||
|
|
||||||
|
while (*pch && *pch != '(' && *pch != '|' && *pch != ','
|
||||||
|
&& !isspace(*pch))
|
||||||
|
{
|
||||||
|
fputc(*pch++, stdout);
|
||||||
|
}
|
||||||
|
fputc('\n', stdout);
|
||||||
|
while (*pch && *pch++ != ',') (void)NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dogetdeps(char *pkgsfile, char **in_pkgs, int pkgc) {
|
||||||
|
char buf[MAX_LINE];
|
||||||
|
char cur_pkg[MAX_LINE];
|
||||||
|
char cur_deps[MAX_LINE];
|
||||||
|
char cur_predeps[MAX_LINE];
|
||||||
|
char prev_pkg[MAX_LINE];
|
||||||
|
char *pkgs[MAX_PKGS];
|
||||||
|
int i;
|
||||||
|
int skip;
|
||||||
|
FILE *f;
|
||||||
|
int output_pkg = -1;
|
||||||
|
|
||||||
|
cur_pkg[0] = cur_deps[0] = cur_predeps[0] = prev_pkg[0] = '\0';
|
||||||
|
|
||||||
|
for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i];
|
||||||
|
|
||||||
|
f = fopen(pkgsfile, "r");
|
||||||
|
if (f == NULL) {
|
||||||
|
perror(pkgsfile);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
skip = 1;
|
||||||
|
while (fgets(buf, sizeof(buf), f)) {
|
||||||
|
if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
|
||||||
|
if (strncasecmp(buf, "Package:", 8) == 0) {
|
||||||
|
int any = 0;
|
||||||
|
skip = 1;
|
||||||
|
fieldcpy(cur_pkg, buf);
|
||||||
|
if (strcmp(cur_pkg, prev_pkg) != 0) {
|
||||||
|
if (output_pkg != -1)
|
||||||
|
pkgs[output_pkg] = NULL;
|
||||||
|
if (cur_deps[0])
|
||||||
|
outputdeps(cur_deps);
|
||||||
|
if (cur_predeps[0])
|
||||||
|
outputdeps(cur_predeps);
|
||||||
|
strcpy(prev_pkg, cur_pkg);
|
||||||
|
}
|
||||||
|
cur_deps[0] = cur_predeps[0] = '\0';
|
||||||
|
output_pkg = -1;
|
||||||
|
for (i = 0; i < pkgc; i++) {
|
||||||
|
if (!pkgs[i]) continue;
|
||||||
|
any = 1;
|
||||||
|
if (strcmp(cur_pkg, pkgs[i]) == 0) {
|
||||||
|
skip = 0;
|
||||||
|
output_pkg = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!any) break;
|
||||||
|
} else if (!skip && strncasecmp(buf, "Depends:", 8) == 0)
|
||||||
|
fieldcpy(cur_deps, buf);
|
||||||
|
else if (!skip && strncasecmp(buf, "Pre-Depends:", 12) == 0)
|
||||||
|
fieldcpy(cur_predeps, buf);
|
||||||
|
}
|
||||||
|
if (cur_deps[0])
|
||||||
|
outputdeps(cur_deps);
|
||||||
|
if (cur_predeps[0])
|
||||||
|
outputdeps(cur_predeps);
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dopkgmirrorpkgs(int uniq, char *mirror, char *pkgsfile,
|
||||||
|
char *fieldname, char **in_pkgs, int pkgc)
|
||||||
|
{
|
||||||
|
char buf[MAX_LINE];
|
||||||
|
char cur_field[MAX_LINE];
|
||||||
|
char cur_pkg[MAX_LINE];
|
||||||
|
char cur_ver[MAX_LINE];
|
||||||
|
char cur_arch[MAX_LINE];
|
||||||
|
char cur_size[MAX_LINE];
|
||||||
|
char cur_checksum[MAX_LINE];
|
||||||
|
char cur_filename[MAX_LINE];
|
||||||
|
char prev_pkg[MAX_LINE];
|
||||||
|
char *pkgs[MAX_PKGS];
|
||||||
|
int i;
|
||||||
|
FILE *f;
|
||||||
|
char *output = NULL;
|
||||||
|
int output_pkg = -1;
|
||||||
|
|
||||||
|
cur_field[0] = cur_pkg[0] = cur_ver[0] = cur_arch[0] = cur_filename[0] = prev_pkg[0] = '\0';
|
||||||
|
|
||||||
|
for (i = 0; i < pkgc; i++) pkgs[i] = in_pkgs[i];
|
||||||
|
|
||||||
|
f = fopen(pkgsfile, "r");
|
||||||
|
if (f == NULL) {
|
||||||
|
perror(pkgsfile);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
while (fgets(buf, sizeof(buf), f)) {
|
||||||
|
if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
|
||||||
|
if (strncasecmp(buf, fieldname, strlen(fieldname)) == 0) {
|
||||||
|
fieldcpy(cur_field, buf);
|
||||||
|
}
|
||||||
|
if (strncasecmp(buf, "Package:", 8) == 0) {
|
||||||
|
fieldcpy(cur_pkg, buf);
|
||||||
|
if (strcmp(cur_pkg, prev_pkg) != 0) {
|
||||||
|
if (output)
|
||||||
|
fputs(output, stdout);
|
||||||
|
if (uniq && output_pkg != -1)
|
||||||
|
pkgs[output_pkg] = NULL;
|
||||||
|
strcpy(prev_pkg, cur_pkg);
|
||||||
|
}
|
||||||
|
free(output);
|
||||||
|
output = NULL;
|
||||||
|
output_pkg = -1;
|
||||||
|
} else if (strncasecmp(buf, "Version:", 8) == 0) {
|
||||||
|
fieldcpy(cur_ver, buf);
|
||||||
|
} else if (strncasecmp(buf, "Architecture:", 13) == 0) {
|
||||||
|
fieldcpy(cur_arch, buf);
|
||||||
|
} else if (strncasecmp(buf, "Size:", 5) == 0) {
|
||||||
|
fieldcpy(cur_size, buf);
|
||||||
|
} else if (strncasecmp(buf, checksum_field, strlen(checksum_field)) == 0
|
||||||
|
&& buf[strlen(checksum_field)] == ':') {
|
||||||
|
fieldcpy(cur_checksum, buf);
|
||||||
|
} else if (strncasecmp(buf, "Filename:", 9) == 0) {
|
||||||
|
fieldcpy(cur_filename, buf);
|
||||||
|
} else if (!*buf) {
|
||||||
|
int any = 0;
|
||||||
|
for (i = 0; i < pkgc; i++) {
|
||||||
|
if (!pkgs[i]) continue;
|
||||||
|
any = 1;
|
||||||
|
if (strcmp(cur_field, pkgs[i]) == 0) {
|
||||||
|
free(output);
|
||||||
|
output = xasprintf("%s %s %s %s %s %s %s\n", cur_pkg, cur_ver, cur_arch, mirror, cur_filename, cur_checksum, cur_size);
|
||||||
|
output_pkg = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!any) break;
|
||||||
|
cur_field[0] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (output)
|
||||||
|
fputs(output, stdout);
|
||||||
|
if (uniq && output_pkg != -1)
|
||||||
|
pkgs[output_pkg] = NULL;
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
/* any that weren't found are returned as "pkg -" */
|
||||||
|
if (uniq) {
|
||||||
|
for (i = 0; i < pkgc; i++) {
|
||||||
|
if (pkgs[i]) {
|
||||||
|
printf("%s -\n", pkgs[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void dopkgstanzas(char *pkgsfile, char **pkgs, int pkgc)
|
||||||
|
{
|
||||||
|
char buf[MAX_LINE];
|
||||||
|
char *accum;
|
||||||
|
size_t accum_size = 0, accum_alloc = MAX_LINE * 2;
|
||||||
|
char cur_pkg[MAX_LINE];
|
||||||
|
FILE *f;
|
||||||
|
|
||||||
|
accum = malloc(accum_alloc);
|
||||||
|
if (!accum)
|
||||||
|
oom_die();
|
||||||
|
|
||||||
|
f = fopen(pkgsfile, "r");
|
||||||
|
if (f == NULL) {
|
||||||
|
perror(pkgsfile);
|
||||||
|
free(accum);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
while (fgets(buf, sizeof(buf), f)) {
|
||||||
|
if (*buf) {
|
||||||
|
size_t len = strlen(buf);
|
||||||
|
if (accum_size + len + 1 > accum_alloc) {
|
||||||
|
accum_alloc = (accum_size + len + 1) * 2;
|
||||||
|
accum = realloc(accum, accum_alloc);
|
||||||
|
if (!accum)
|
||||||
|
oom_die();
|
||||||
|
}
|
||||||
|
strcpy(accum + accum_size, buf);
|
||||||
|
accum_size += len;
|
||||||
|
}
|
||||||
|
if (*buf && buf[strlen(buf)-1] == '\n') buf[strlen(buf)-1] = '\0';
|
||||||
|
if (strncasecmp(buf, "Package:", 8) == 0) {
|
||||||
|
fieldcpy(cur_pkg, buf);
|
||||||
|
} else if (!*buf) {
|
||||||
|
int i;
|
||||||
|
for (i = 0; i < pkgc; i++) {
|
||||||
|
if (!pkgs[i]) continue;
|
||||||
|
if (strcmp(cur_pkg, pkgs[i]) == 0) {
|
||||||
|
fputs(accum, stdout);
|
||||||
|
if (accum[accum_size - 1] != '\n')
|
||||||
|
fputs("\n\n", stdout);
|
||||||
|
else if (accum[accum_size - 2] != '\n')
|
||||||
|
fputc('\n', stdout);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*accum = '\0';
|
||||||
|
accum_size = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
free(accum);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int dotranslatewgetpercent(int low, int high, int end, char *str) {
|
||||||
|
int ch;
|
||||||
|
int val, lastval;
|
||||||
|
|
||||||
|
/* print out anything that looks like a % on its own line, appropriately
|
||||||
|
* scaled */
|
||||||
|
|
||||||
|
lastval = val = 0;
|
||||||
|
while ( (ch = getchar()) != EOF ) {
|
||||||
|
if (isdigit(ch)) {
|
||||||
|
val *= 10; val += ch - '0';
|
||||||
|
} else if (ch == '%') {
|
||||||
|
float f = (float) val / 100.0 * (high - low) + low;
|
||||||
|
if (str) {
|
||||||
|
printf("P: %d %d %s\n", (int) f, end, str);
|
||||||
|
} else {
|
||||||
|
printf("P: %d %d\n", (int) f, end);
|
||||||
|
}
|
||||||
|
lastval = val;
|
||||||
|
} else {
|
||||||
|
val = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return lastval == 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
checksum_field=getenv("DEBOOTSTRAP_CHECKSUM_FIELD");
|
||||||
|
if (checksum_field == NULL) {
|
||||||
|
checksum_field="MD5sum";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((argc == 6 || argc == 5) && strcmp(argv[1], "WGET%") == 0) {
|
||||||
|
if (dotranslatewgetpercent(atoi(argv[2]), atoi(argv[3]),
|
||||||
|
atoi(argv[4]), argc == 6 ? argv[5] : NULL))
|
||||||
|
{
|
||||||
|
exit(0);
|
||||||
|
} else {
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
} else if (argc >= 4 && strcmp(argv[1], "GETDEPS") == 0) {
|
||||||
|
int i;
|
||||||
|
for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) {
|
||||||
|
dogetdeps(argv[2], argv+i, MAX_PKGS);
|
||||||
|
}
|
||||||
|
dogetdeps(argv[2], argv+i, argc-i);
|
||||||
|
exit(0);
|
||||||
|
} else if (argc >= 5 && strcmp(argv[1], "PKGS") == 0) {
|
||||||
|
int i;
|
||||||
|
for (i = 4; argc - i > MAX_PKGS; i += MAX_PKGS) {
|
||||||
|
dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, MAX_PKGS);
|
||||||
|
}
|
||||||
|
dopkgmirrorpkgs(1, argv[2], argv[3], "Package:", argv+i, argc-i);
|
||||||
|
exit(0);
|
||||||
|
} else if (argc >= 6 && strcmp(argv[1], "FIELD") == 0) {
|
||||||
|
int i;
|
||||||
|
for (i = 5; argc - i > MAX_PKGS; i += MAX_PKGS) {
|
||||||
|
dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, MAX_PKGS);
|
||||||
|
}
|
||||||
|
dopkgmirrorpkgs(0, argv[3], argv[4], argv[2], argv+i, argc-i);
|
||||||
|
exit(0);
|
||||||
|
} else if (argc >= 4 && strcmp(argv[1], "STANZAS") == 0) {
|
||||||
|
int i;
|
||||||
|
for (i = 3; argc - i > MAX_PKGS; i += MAX_PKGS) {
|
||||||
|
dopkgstanzas(argv[2], argv+i, MAX_PKGS);
|
||||||
|
}
|
||||||
|
dopkgstanzas(argv[2], argv+i, argc-i);
|
||||||
|
exit(0);
|
||||||
|
} else {
|
||||||
|
fprintf(stderr, "usage: %s PKGS mirror packagesfile pkgs..\n", argv[0]);
|
||||||
|
fprintf(stderr, " or: %s FIELD field mirror packagesfile pkgs..\n",
|
||||||
|
argv[0]);
|
||||||
|
fprintf(stderr, " or: %s GETDEPS packagesfile pkgs..\n", argv[0]);
|
||||||
|
fprintf(stderr, " or: %s STANZAS packagesfile pkgs..\n", argv[0]);
|
||||||
|
fprintf(stderr, " or: %s WGET%% low high end reason\n", argv[0]);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
10
packages/admin/debootstrap/patches/010-no-nvswitch.patch
Normal file
10
packages/admin/debootstrap/patches/010-no-nvswitch.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- a/usr/share/debootstrap/functions
|
||||||
|
+++ b/usr/share/debootstrap/functions
|
||||||
|
@@ -78,7 +78,6 @@ progress_next () {
|
||||||
|
}
|
||||||
|
|
||||||
|
wgetprogress () {
|
||||||
|
- [ ! "$VERBOSE" ] && NVSWITCH="-nv"
|
||||||
|
local ret=0
|
||||||
|
if [ "$USE_DEBIANINSTALLER_INTERACTION" ] && [ "$PROGRESS_NEXT" ]; then
|
||||||
|
# The exit status of a pipeline is that of the last command in
|
57
packages/admin/fluent-bit/Makefile
Normal file
57
packages/admin/fluent-bit/Makefile
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=fluent-bit
|
||||||
|
PKG_VERSION:=3.1.3
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
|
||||||
|
PKG_SOURCE_VERSION=v$(PKG_VERSION)
|
||||||
|
PKG_MIRROR_HASH:=85b861693a9ed597e4e55e30330dd2fb96daa997eb71424a55ccc28de92eef78
|
||||||
|
|
||||||
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
define Package/fluent-bit
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Fast and Lightweight Logs and Metrics processor
|
||||||
|
URL:=https://fluentbit.io/
|
||||||
|
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fluent-bit/description
|
||||||
|
Fluent Bit is a super fast, lightweight, and highly scalable logging
|
||||||
|
and metrics processor and forwarder.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/fluent-bit/conffiles
|
||||||
|
/etc/fluent-bit/parsers.conf
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_LDFLAGS +=-lfts -latomic
|
||||||
|
|
||||||
|
CMAKE_OPTIONS+= \
|
||||||
|
-DFLB_RELEASE=Yes \
|
||||||
|
-DEXCLUDE_FROM_ALL=true \
|
||||||
|
-DFLB_EXAMPLES=No \
|
||||||
|
-DFLB_CHUNK_TRACE=No \
|
||||||
|
-DFLB_BACKTRACE=No \
|
||||||
|
-DFLB_WASM=No \
|
||||||
|
-DFLB_LUAJIT=No \
|
||||||
|
-DWITH_SASL=No \
|
||||||
|
-DWITH_ZLIB=No \
|
||||||
|
-DWITH_ZSTD=No
|
||||||
|
|
||||||
|
define Package/fluent-bit/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/fluent-bit $(1)/usr/sbin/
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/etc/fluent-bit
|
||||||
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/conf/parsers.conf $(1)/etc/fluent-bit/parsers.conf
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,fluent-bit))
|
61
packages/admin/gkrellmd/Makefile
Normal file
61
packages/admin/gkrellmd/Makefile
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2007-2018 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=gkrellmd
|
||||||
|
PKG_VERSION:=2.3.11
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2
|
||||||
|
PKG_SOURCE_URL:=http://gkrellm.srcbox.net/releases
|
||||||
|
PKG_HASH:=1ee0643ed9ed99f88c1504c89d9ccb20780cf29319c904b68e80a8e7c8678c06
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Peter Denison <openwrt@marshadder.org>
|
||||||
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
|
||||||
|
define Package/gkrellmd
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
DEPENDS:=+glib2
|
||||||
|
TITLE:=The GNU Krell Monitors Server
|
||||||
|
URL:=http://gkrellm.net/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/gkrellmd/description
|
||||||
|
Gkrellmd listens for connections from gkrellm clients. When
|
||||||
|
a gkrellm client connects to a gkrellmd server all builtin
|
||||||
|
monitors collect their data from the server.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/gkrellmd/conffiles
|
||||||
|
/etc/$(PKG_NAME).conf
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR)/server \
|
||||||
|
CC="$(TARGET_CC)" \
|
||||||
|
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
|
||||||
|
LDFLAGS="$(TARGET_LDFLAGS) " \
|
||||||
|
without-libsensors="yes"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/gkrellmd/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc
|
||||||
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,gkrellmd))
|
16
packages/admin/gkrellmd/files/gkrellmd.init
Normal file
16
packages/admin/gkrellmd/files/gkrellmd.init
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2007 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
|
BIN=gkrellmd
|
||||||
|
RUN_D=/var/run
|
||||||
|
PID_F=$RUN_D/$BIN.pid
|
||||||
|
|
||||||
|
start() {
|
||||||
|
mkdir -p $RUN_D
|
||||||
|
$BIN $OPTIONS
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
[ -f $PID_F ] && kill $(cat $PID_F)
|
||||||
|
}
|
33
packages/admin/gkrellmd/patches/100-conf.patch
Normal file
33
packages/admin/gkrellmd/patches/100-conf.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
--- a/server/gkrellmd.conf
|
||||||
|
+++ b/server/gkrellmd.conf
|
||||||
|
@@ -4,7 +4,7 @@
|
||||||
|
# the client update frequency. Values may be from 1 to 10 and should be
|
||||||
|
# smaller values to reduce network traffic.
|
||||||
|
#
|
||||||
|
-#update-hz 3
|
||||||
|
+update-hz 10
|
||||||
|
|
||||||
|
# Limit number of simultaneous clients allowed to connect.
|
||||||
|
#
|
||||||
|
@@ -30,18 +30,18 @@
|
||||||
|
# Drop privileges after startup (you must start gkrellmd as root to do it).
|
||||||
|
# NOTE: Option ignored on Windows
|
||||||
|
#
|
||||||
|
-#user nobody
|
||||||
|
+user nobody
|
||||||
|
#group proc
|
||||||
|
|
||||||
|
# Create a PID file for the running gkrellmd. Default is no PID file.
|
||||||
|
# NOTE: Option ignored on Windows
|
||||||
|
#
|
||||||
|
-#pidfile /var/run/gkrellmd.pid
|
||||||
|
+pidfile /var/run/gkrellmd.pid
|
||||||
|
|
||||||
|
# Run in background and detach from the controlling terminal
|
||||||
|
# NOTE: Option ignored on Windows
|
||||||
|
#
|
||||||
|
-#detach
|
||||||
|
+detach
|
||||||
|
|
||||||
|
# Enable writing logging message to the system syslog file
|
||||||
|
# NOTE: On windows this enables logging to the windows event log
|
42
packages/admin/gotop/Makefile
Normal file
42
packages/admin/gotop/Makefile
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-3.0-only
|
||||||
|
#
|
||||||
|
# Copyright (C) 2021 ImmortalWrt.org
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=gotop
|
||||||
|
PKG_VERSION:=4.2.0
|
||||||
|
PKG_RELEASE:=4
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/xxxserxxx/gotop/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=e9d9041903acb6bd3ffe94e0a02e69eea53f1128274da1bfe00fe44331ccceb1
|
||||||
|
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=golang/host
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_BUILD_FLAGS:=no-mips16
|
||||||
|
|
||||||
|
GO_PKG:=github.com/xxxserxxx/gotop
|
||||||
|
GO_PKG_LDFLAGS_X:=main.Version=$(PKG_VERSION)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include ../../lang/golang/golang-package.mk
|
||||||
|
|
||||||
|
define Package/gotop
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=A terminal based graphical activity monitor
|
||||||
|
URL:=https://github.com/xxxserxxx/gotop
|
||||||
|
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/gotop/description
|
||||||
|
Another terminal based graphical activity monitor.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call GoBinPackage,gotop))
|
||||||
|
$(eval $(call BuildPackage,gotop))
|
@ -0,0 +1,76 @@
|
|||||||
|
From 658926bd0fa8e15c75c4db1426f2b20307312870 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Camber Huang <camber@poi.science>
|
||||||
|
Date: Mon, 9 May 2022 14:04:06 +0800
|
||||||
|
Subject: [PATCH] Fix build failure on riscv64 caused by missing syscall
|
||||||
|
|
||||||
|
On RISC-V 64-bit linux systems, syscall `dup2()` is not available, therefore
|
||||||
|
syscall.Dup2 will be undefined and gotop will fail to be built from soure.
|
||||||
|
This patch updates building target of logging/logging_{other,arm64} and
|
||||||
|
renames them based on syscall used.
|
||||||
|
---
|
||||||
|
logging/{logging_other.go => logging_dup2.go} | 2 +-
|
||||||
|
logging/{logging_arm64.go => logging_dup3.go} | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
rename logging/{logging_other.go => logging_dup2.go} (67%)
|
||||||
|
rename logging/{logging_arm64.go => logging_dup3.go} (73%)
|
||||||
|
|
||||||
|
--- a/logging/logging_other.go
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,12 +0,0 @@
|
||||||
|
-// +build linux,!arm64 openbsd,!arm64 freebsd darwin
|
||||||
|
-
|
||||||
|
-package logging
|
||||||
|
-
|
||||||
|
-import (
|
||||||
|
- "os"
|
||||||
|
- "syscall"
|
||||||
|
-)
|
||||||
|
-
|
||||||
|
-func stderrToLogfile(logfile *os.File) {
|
||||||
|
- syscall.Dup2(int(logfile.Fd()), 2)
|
||||||
|
-}
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/logging/logging_dup2.go
|
||||||
|
@@ -0,0 +1,12 @@
|
||||||
|
+// +build linux,!arm64,!riscv64 openbsd,!arm64 freebsd darwin
|
||||||
|
+
|
||||||
|
+package logging
|
||||||
|
+
|
||||||
|
+import (
|
||||||
|
+ "os"
|
||||||
|
+ "syscall"
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+func stderrToLogfile(logfile *os.File) {
|
||||||
|
+ syscall.Dup2(int(logfile.Fd()), 2)
|
||||||
|
+}
|
||||||
|
--- a/logging/logging_arm64.go
|
||||||
|
+++ /dev/null
|
||||||
|
@@ -1,12 +0,0 @@
|
||||||
|
-// +build !freebsd,!darwin,arm64
|
||||||
|
-
|
||||||
|
-package logging
|
||||||
|
-
|
||||||
|
-import (
|
||||||
|
- "os"
|
||||||
|
- "syscall"
|
||||||
|
-)
|
||||||
|
-
|
||||||
|
-func stderrToLogfile(logfile *os.File) {
|
||||||
|
- syscall.Dup3(int(logfile.Fd()), 2, 0)
|
||||||
|
-}
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/logging/logging_dup3.go
|
||||||
|
@@ -0,0 +1,12 @@
|
||||||
|
+// +build !freebsd,!darwin,arm64 linux,riscv64
|
||||||
|
+
|
||||||
|
+package logging
|
||||||
|
+
|
||||||
|
+import (
|
||||||
|
+ "os"
|
||||||
|
+ "syscall"
|
||||||
|
+)
|
||||||
|
+
|
||||||
|
+func stderrToLogfile(logfile *os.File) {
|
||||||
|
+ syscall.Dup3(int(logfile.Fd()), 2, 0)
|
||||||
|
+}
|
76
packages/admin/htop/Makefile
Normal file
76
packages/admin/htop/Makefile
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2007-2016 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=htop
|
||||||
|
PKG_VERSION:=3.3.0
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/htop-dev/htop/tar.gz/$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=1e5cc328eee2bd1acff89f860e3179ea24b85df3ac483433f92a29977b14b045
|
||||||
|
|
||||||
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:htop:htop
|
||||||
|
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS:= CONFIG_HTOP_LMSENSORS
|
||||||
|
PKG_BUILD_DEPENDS:= HTOP_LMSENSORS:lm-sensors
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/htop
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Interactive processes viewer
|
||||||
|
DEPENDS:=+libncurses
|
||||||
|
URL:=https://hisham.hm/htop/
|
||||||
|
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/htop/description
|
||||||
|
Htop is an ncursed-based process viewer similar to top, but
|
||||||
|
it allows to scroll the list vertically and horizontally to
|
||||||
|
see all processes and their full command lines.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/htop/config
|
||||||
|
config HTOP_LMSENSORS
|
||||||
|
bool "Compile Htop with lm-sensors support"
|
||||||
|
depends on PACKAGE_htop
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Build htop with lm-sensors support.
|
||||||
|
This increases the binary by approx 5 kB.
|
||||||
|
Users wanting this functionality need to
|
||||||
|
install libsensors.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--$(if $(CONFIG_HTOP_LMSENSORS),en,dis)able-sensors \
|
||||||
|
--enable-affinity \
|
||||||
|
--disable-capabilities \
|
||||||
|
--disable-delayacct \
|
||||||
|
--disable-unicode \
|
||||||
|
--disable-unwind \
|
||||||
|
--disable-hwloc
|
||||||
|
|
||||||
|
CONFIGURE_VARS += \
|
||||||
|
ac_cv_file__proc_stat=yes \
|
||||||
|
ac_cv_file__proc_meminfo=yes
|
||||||
|
|
||||||
|
define Package/htop/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(PKG_NAME) $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,htop))
|
51
packages/admin/ipmitool/Makefile
Normal file
51
packages/admin/ipmitool/Makefile
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2017 Alexander Couzens <lynxis@fe80.eu>
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=ipmitool
|
||||||
|
PKG_VERSION:=1.8.18
|
||||||
|
PKG_RELEASE:=5
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
|
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
|
||||||
|
PKG_HASH:=0c1ba3b1555edefb7c32ae8cd6a3e04322056bc087918f07189eeedfc8b81e01
|
||||||
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:ipmitool_project:ipmitool
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/ipmitool
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
DEPENDS:=+libopenssl +libncurses +libreadline
|
||||||
|
TITLE:=Command-line interface to IPMI-enabled devices
|
||||||
|
URL:=https://github.com/ipmitool/ipmitool
|
||||||
|
MAINTAINER:=Alexander Couzens <lynxis@fe80.eu>
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/ipmitool/Default/description
|
||||||
|
Command-line interface to IPMI-enabled devices
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/ipmitool/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ipmievd $(1)/usr/sbin/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ipmitool $(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--enable-intf-lan \
|
||||||
|
--enable-intf-lanplus \
|
||||||
|
--enable-intf-serial \
|
||||||
|
--enable-intf-free \
|
||||||
|
--enable-intf-open \
|
||||||
|
--enable-intf-imb \
|
||||||
|
--enable-ipmishell
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,ipmitool))
|
@ -0,0 +1,99 @@
|
|||||||
|
From b57487e360916ab3eaa50aa6d021c73b6337a4a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dennis Schridde <dennis.schridde@uni-heidelberg.de>
|
||||||
|
Date: Wed, 30 Nov 2016 17:33:00 +0100
|
||||||
|
Subject: [PATCH 1/4] ID:461 - OpenSSL 1.1 compatibility - "error: storage size
|
||||||
|
of 'ctx' isn't known"
|
||||||
|
|
||||||
|
In OpenSSL 1.1 EVP_CIPHER_CTX became opaque, cf. `man 3ssl EVP_EncryptInit`
|
||||||
|
|
||||||
|
Fixes: ID:461
|
||||||
|
---
|
||||||
|
src/plugins/lanplus/lanplus_crypt_impl.c | 28 ++++++++++++++--------------
|
||||||
|
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
|
--- a/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
+++ b/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
@@ -164,10 +164,10 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
uint8_t * output,
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
- EVP_CIPHER_CTX ctx;
|
||||||
|
- EVP_CIPHER_CTX_init(&ctx);
|
||||||
|
- EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
- EVP_CIPHER_CTX_set_padding(&ctx, 0);
|
||||||
|
+ EVP_CIPHER_CTX* ctx;
|
||||||
|
+ EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
||||||
|
|
||||||
|
*bytes_written = 0;
|
||||||
|
@@ -191,7 +191,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
|
||||||
|
|
||||||
|
|
||||||
|
- if(!EVP_EncryptUpdate(&ctx, output, (int *)bytes_written, input, input_length))
|
||||||
|
+ if(!EVP_EncryptUpdate(ctx, output, (int *)bytes_written, input, input_length))
|
||||||
|
{
|
||||||
|
/* Error */
|
||||||
|
*bytes_written = 0;
|
||||||
|
@@ -201,7 +201,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
{
|
||||||
|
uint32_t tmplen;
|
||||||
|
|
||||||
|
- if(!EVP_EncryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
|
||||||
|
+ if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
|
||||||
|
{
|
||||||
|
*bytes_written = 0;
|
||||||
|
return; /* Error */
|
||||||
|
@@ -210,7 +210,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
{
|
||||||
|
/* Success */
|
||||||
|
*bytes_written += tmplen;
|
||||||
|
- EVP_CIPHER_CTX_cleanup(&ctx);
|
||||||
|
+ EVP_CIPHER_CTX_cleanup(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -239,10 +239,10 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
uint8_t * output,
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
- EVP_CIPHER_CTX ctx;
|
||||||
|
- EVP_CIPHER_CTX_init(&ctx);
|
||||||
|
- EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
- EVP_CIPHER_CTX_set_padding(&ctx, 0);
|
||||||
|
+ EVP_CIPHER_CTX* ctx;
|
||||||
|
+ EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
||||||
|
|
||||||
|
if (verbose >= 5)
|
||||||
|
@@ -266,7 +266,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
assert((input_length % IPMI_CRYPT_AES_CBC_128_BLOCK_SIZE) == 0);
|
||||||
|
|
||||||
|
|
||||||
|
- if (!EVP_DecryptUpdate(&ctx, output, (int *)bytes_written, input, input_length))
|
||||||
|
+ if (!EVP_DecryptUpdate(ctx, output, (int *)bytes_written, input, input_length))
|
||||||
|
{
|
||||||
|
/* Error */
|
||||||
|
lprintf(LOG_DEBUG, "ERROR: decrypt update failed");
|
||||||
|
@@ -277,7 +277,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
{
|
||||||
|
uint32_t tmplen;
|
||||||
|
|
||||||
|
- if (!EVP_DecryptFinal_ex(&ctx, output + *bytes_written, (int *)&tmplen))
|
||||||
|
+ if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
|
||||||
|
{
|
||||||
|
char buffer[1000];
|
||||||
|
ERR_error_string(ERR_get_error(), buffer);
|
||||||
|
@@ -290,7 +290,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
{
|
||||||
|
/* Success */
|
||||||
|
*bytes_written += tmplen;
|
||||||
|
- EVP_CIPHER_CTX_cleanup(&ctx);
|
||||||
|
+ EVP_CIPHER_CTX_cleanup(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 77fe5635037ebaf411cae46cf5045ca819b5c145 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Styblik <stybla@turnovfree.net>
|
||||||
|
Date: Sun, 15 Jan 2017 15:11:25 +0100
|
||||||
|
Subject: [PATCH 2/4] ID:461 - Make compiler happier about changes related to
|
||||||
|
OpenSSL 1.1
|
||||||
|
|
||||||
|
Complaint was that ctx isn't initialized.
|
||||||
|
---
|
||||||
|
src/plugins/lanplus/lanplus_crypt_impl.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
+++ b/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
@@ -164,7 +164,7 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
uint8_t * output,
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
- EVP_CIPHER_CTX* ctx;
|
||||||
|
+ EVP_CIPHER_CTX *ctx = NULL;
|
||||||
|
EVP_CIPHER_CTX_init(ctx);
|
||||||
|
EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
@@ -239,7 +239,7 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
uint8_t * output,
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
- EVP_CIPHER_CTX* ctx;
|
||||||
|
+ EVP_CIPHER_CTX *ctx = NULL;
|
||||||
|
EVP_CIPHER_CTX_init(ctx);
|
||||||
|
EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
@ -0,0 +1,48 @@
|
|||||||
|
From f004b4b7197fc83e7d47ec8cbcaefffa9a922717 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Zdenek Styblik <stybla@turnovfree.net>
|
||||||
|
Date: Sun, 12 Mar 2017 14:00:35 +0100
|
||||||
|
Subject: [PATCH 3/4] ID:480 - ipmitool coredumps in EVP_CIPHER_CTX_init
|
||||||
|
|
||||||
|
IPMI tool coredumps due to changes introduced in ID:461. This shouldn't be
|
||||||
|
surprise as a NULL pointer is passed to init. Commit addresses this issue by
|
||||||
|
calling EVP_CIPHER_CTX_new() instead of EVP_CIPHER_CTX_init(), which is
|
||||||
|
deprecated, and by checking return value of call to former function.
|
||||||
|
---
|
||||||
|
src/plugins/lanplus/lanplus_crypt_impl.c | 14 ++++++++++----
|
||||||
|
1 file changed, 10 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
+++ b/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
@@ -165,10 +165,13 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
EVP_CIPHER_CTX *ctx = NULL;
|
||||||
|
- EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+ ctx = EVP_CIPHER_CTX_new();
|
||||||
|
+ if (ctx == NULL) {
|
||||||
|
+ *bytes_written = 0;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
-
|
||||||
|
|
||||||
|
*bytes_written = 0;
|
||||||
|
|
||||||
|
@@ -240,11 +243,14 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
EVP_CIPHER_CTX *ctx = NULL;
|
||||||
|
- EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+ ctx = EVP_CIPHER_CTX_new();
|
||||||
|
+ if (ctx == NULL) {
|
||||||
|
+ *bytes_written = 0;
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
||||||
|
-
|
||||||
|
if (verbose >= 5)
|
||||||
|
{
|
||||||
|
printbuf(iv, 16, "decrypting with this IV");
|
@ -0,0 +1,139 @@
|
|||||||
|
From 1664902525a1c3771b4d8b3ccab7ea1ba6b2bdd1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Holger Liebig <holger.liebig@ts.fujitsu.com>
|
||||||
|
Date: Tue, 4 Apr 2017 20:43:05 +0200
|
||||||
|
Subject: [PATCH 4/4] ID:480 - Call EVP_CIPHER_CTX_free() instead of
|
||||||
|
EVP_CIPHER_CTX_cleanup()
|
||||||
|
|
||||||
|
Call EVP_CIPHER_CTX_free() instead of EVP_CIPHER_CTX_cleanup() to fix memory
|
||||||
|
leak.
|
||||||
|
---
|
||||||
|
src/plugins/lanplus/lanplus_crypt_impl.c | 44 +++++++++++++++++---------------
|
||||||
|
1 file changed, 23 insertions(+), 21 deletions(-)
|
||||||
|
|
||||||
|
--- a/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
+++ b/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
@@ -165,13 +165,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
EVP_CIPHER_CTX *ctx = NULL;
|
||||||
|
- ctx = EVP_CIPHER_CTX_new();
|
||||||
|
- if (ctx == NULL) {
|
||||||
|
- *bytes_written = 0;
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
- EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
||||||
|
*bytes_written = 0;
|
||||||
|
|
||||||
|
@@ -185,6 +178,14 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
printbuf(input, input_length, "encrypting this data");
|
||||||
|
}
|
||||||
|
|
||||||
|
+ ctx = EVP_CIPHER_CTX_new();
|
||||||
|
+ if (ctx == NULL) {
|
||||||
|
+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+ EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The default implementation adds a whole block of padding if the input
|
||||||
|
@@ -198,7 +199,6 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
{
|
||||||
|
/* Error */
|
||||||
|
*bytes_written = 0;
|
||||||
|
- return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -206,16 +206,17 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
|
||||||
|
if(!EVP_EncryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
|
||||||
|
{
|
||||||
|
+ /* Error */
|
||||||
|
*bytes_written = 0;
|
||||||
|
- return; /* Error */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Success */
|
||||||
|
*bytes_written += tmplen;
|
||||||
|
- EVP_CIPHER_CTX_cleanup(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ /* performs cleanup and free */
|
||||||
|
+ EVP_CIPHER_CTX_free(ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -243,13 +244,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
uint32_t * bytes_written)
|
||||||
|
{
|
||||||
|
EVP_CIPHER_CTX *ctx = NULL;
|
||||||
|
- ctx = EVP_CIPHER_CTX_new();
|
||||||
|
- if (ctx == NULL) {
|
||||||
|
- *bytes_written = 0;
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
- EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
||||||
|
if (verbose >= 5)
|
||||||
|
{
|
||||||
|
@@ -258,12 +252,20 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
printbuf(input, input_length, "decrypting this data");
|
||||||
|
}
|
||||||
|
|
||||||
|
-
|
||||||
|
*bytes_written = 0;
|
||||||
|
|
||||||
|
if (input_length == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
+ ctx = EVP_CIPHER_CTX_new();
|
||||||
|
+ if (ctx == NULL) {
|
||||||
|
+ lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+ EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
+ EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* The default implementation adds a whole block of padding if the input
|
||||||
|
* data is perfectly aligned. We would like to keep that from happening.
|
||||||
|
@@ -277,7 +279,6 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
/* Error */
|
||||||
|
lprintf(LOG_DEBUG, "ERROR: decrypt update failed");
|
||||||
|
*bytes_written = 0;
|
||||||
|
- return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
@@ -285,20 +286,21 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
|
||||||
|
if (!EVP_DecryptFinal_ex(ctx, output + *bytes_written, (int *)&tmplen))
|
||||||
|
{
|
||||||
|
+ /* Error */
|
||||||
|
char buffer[1000];
|
||||||
|
ERR_error_string(ERR_get_error(), buffer);
|
||||||
|
lprintf(LOG_DEBUG, "the ERR error %s", buffer);
|
||||||
|
lprintf(LOG_DEBUG, "ERROR: decrypt final failed");
|
||||||
|
*bytes_written = 0;
|
||||||
|
- return; /* Error */
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Success */
|
||||||
|
*bytes_written += tmplen;
|
||||||
|
- EVP_CIPHER_CTX_cleanup(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ /* performs cleanup and free */
|
||||||
|
+ EVP_CIPHER_CTX_free(ctx);
|
||||||
|
|
||||||
|
if (verbose >= 5)
|
||||||
|
{
|
@ -0,0 +1,42 @@
|
|||||||
|
From cf39da53236abf02d39c6a98a645488933f3e861 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rosen Penev <rosenp@gmail.com>
|
||||||
|
Date: Tue, 21 Aug 2018 19:29:07 -0700
|
||||||
|
Subject: [PATCH] ipmitool: Fix compile with deprecated APIs disabled.
|
||||||
|
|
||||||
|
From the man page:
|
||||||
|
|
||||||
|
EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0. As a result,
|
||||||
|
EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared.
|
||||||
|
EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset().
|
||||||
|
|
||||||
|
Signed-off-by: Rosen Penev <rosenp@gmail.com>
|
||||||
|
---
|
||||||
|
src/plugins/lanplus/lanplus_crypt_impl.c | 8 ++++++++
|
||||||
|
1 file changed, 8 insertions(+)
|
||||||
|
|
||||||
|
--- a/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
+++ b/src/plugins/lanplus/lanplus_crypt_impl.c
|
||||||
|
@@ -183,7 +183,11 @@ lanplus_encrypt_aes_cbc_128(const uint8_
|
||||||
|
lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+#else
|
||||||
|
+ EVP_CIPHER_CTX_reset(ctx);
|
||||||
|
+#endif
|
||||||
|
EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
||||||
|
@@ -262,7 +266,11 @@ lanplus_decrypt_aes_cbc_128(const uint8_
|
||||||
|
lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
|
EVP_CIPHER_CTX_init(ctx);
|
||||||
|
+#else
|
||||||
|
+ EVP_CIPHER_CTX_reset(ctx);
|
||||||
|
+#endif
|
||||||
|
EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
|
||||||
|
EVP_CIPHER_CTX_set_padding(ctx, 0);
|
||||||
|
|
@ -0,0 +1,123 @@
|
|||||||
|
From 960dbb956d9f9cb05b719087faed53c88dc80956 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chrostoper Ertl <chertl@microsoft.com>
|
||||||
|
Date: Thu, 28 Nov 2019 16:33:59 +0000
|
||||||
|
Subject: [PATCH 06/11] fru: Fix buffer overflow vulnerabilities
|
||||||
|
|
||||||
|
Partial fix for CVE-2020-5208, see
|
||||||
|
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
|
||||||
|
|
||||||
|
The `read_fru_area_section` function only performs size validation of
|
||||||
|
requested read size, and falsely assumes that the IPMI message will not
|
||||||
|
respond with more than the requested amount of data; it uses the
|
||||||
|
unvalidated response size to copy into `frubuf`. If the response is
|
||||||
|
larger than the request, this can result in overflowing the buffer.
|
||||||
|
|
||||||
|
The same issue affects the `read_fru_area` function.
|
||||||
|
---
|
||||||
|
lib/ipmi_fru.c | 33 +++++++++++++++++++++++++++++++--
|
||||||
|
1 file changed, 31 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/ipmi_fru.c
|
||||||
|
+++ b/lib/ipmi_fru.c
|
||||||
|
@@ -615,7 +615,10 @@ int
|
||||||
|
read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id,
|
||||||
|
uint32_t offset, uint32_t length, uint8_t *frubuf)
|
||||||
|
{
|
||||||
|
- uint32_t off = offset, tmp, finish;
|
||||||
|
+ uint32_t off = offset;
|
||||||
|
+ uint32_t tmp;
|
||||||
|
+ uint32_t finish;
|
||||||
|
+ uint32_t size_left_in_buffer;
|
||||||
|
struct ipmi_rs * rsp;
|
||||||
|
struct ipmi_rq req;
|
||||||
|
uint8_t msg_data[4];
|
||||||
|
@@ -628,10 +631,12 @@ read_fru_area(struct ipmi_intf * intf, s
|
||||||
|
|
||||||
|
finish = offset + length;
|
||||||
|
if (finish > fru->size) {
|
||||||
|
+ memset(frubuf + fru->size, 0, length - fru->size);
|
||||||
|
finish = fru->size;
|
||||||
|
lprintf(LOG_NOTICE, "Read FRU Area length %d too large, "
|
||||||
|
"Adjusting to %d",
|
||||||
|
offset + length, finish - offset);
|
||||||
|
+ length = finish - offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(&req, 0, sizeof(req));
|
||||||
|
@@ -667,6 +672,7 @@ read_fru_area(struct ipmi_intf * intf, s
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+ size_left_in_buffer = length;
|
||||||
|
do {
|
||||||
|
tmp = fru->access ? off >> 1 : off;
|
||||||
|
msg_data[0] = id;
|
||||||
|
@@ -707,9 +713,18 @@ read_fru_area(struct ipmi_intf * intf, s
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0];
|
||||||
|
+ if(rsp->data_len < 1
|
||||||
|
+ || tmp > rsp->data_len - 1
|
||||||
|
+ || tmp > size_left_in_buffer)
|
||||||
|
+ {
|
||||||
|
+ printf(" Not enough buffer size");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
memcpy(frubuf, rsp->data + 1, tmp);
|
||||||
|
off += tmp;
|
||||||
|
frubuf += tmp;
|
||||||
|
+ size_left_in_buffer -= tmp;
|
||||||
|
/* sometimes the size returned in the Info command
|
||||||
|
* is too large. return 0 so higher level function
|
||||||
|
* still attempts to parse what was returned */
|
||||||
|
@@ -742,7 +757,9 @@ read_fru_area_section(struct ipmi_intf *
|
||||||
|
uint32_t offset, uint32_t length, uint8_t *frubuf)
|
||||||
|
{
|
||||||
|
static uint32_t fru_data_rqst_size = 20;
|
||||||
|
- uint32_t off = offset, tmp, finish;
|
||||||
|
+ uint32_t off = offset;
|
||||||
|
+ uint32_t tmp, finish;
|
||||||
|
+ uint32_t size_left_in_buffer;
|
||||||
|
struct ipmi_rs * rsp;
|
||||||
|
struct ipmi_rq req;
|
||||||
|
uint8_t msg_data[4];
|
||||||
|
@@ -755,10 +772,12 @@ read_fru_area_section(struct ipmi_intf *
|
||||||
|
|
||||||
|
finish = offset + length;
|
||||||
|
if (finish > fru->size) {
|
||||||
|
+ memset(frubuf + fru->size, 0, length - fru->size);
|
||||||
|
finish = fru->size;
|
||||||
|
lprintf(LOG_NOTICE, "Read FRU Area length %d too large, "
|
||||||
|
"Adjusting to %d",
|
||||||
|
offset + length, finish - offset);
|
||||||
|
+ length = finish - offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
memset(&req, 0, sizeof(req));
|
||||||
|
@@ -773,6 +792,8 @@ read_fru_area_section(struct ipmi_intf *
|
||||||
|
if (fru->access && fru_data_rqst_size > 16)
|
||||||
|
#endif
|
||||||
|
fru_data_rqst_size = 16;
|
||||||
|
+
|
||||||
|
+ size_left_in_buffer = length;
|
||||||
|
do {
|
||||||
|
tmp = fru->access ? off >> 1 : off;
|
||||||
|
msg_data[0] = id;
|
||||||
|
@@ -804,8 +825,16 @@ read_fru_area_section(struct ipmi_intf *
|
||||||
|
}
|
||||||
|
|
||||||
|
tmp = fru->access ? rsp->data[0] << 1 : rsp->data[0];
|
||||||
|
+ if(rsp->data_len < 1
|
||||||
|
+ || tmp > rsp->data_len - 1
|
||||||
|
+ || tmp > size_left_in_buffer)
|
||||||
|
+ {
|
||||||
|
+ printf(" Not enough buffer size");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
memcpy((frubuf + off)-offset, rsp->data + 1, tmp);
|
||||||
|
off += tmp;
|
||||||
|
+ size_left_in_buffer -= tmp;
|
||||||
|
|
||||||
|
/* sometimes the size returned in the Info command
|
||||||
|
* is too large. return 0 so higher level function
|
@ -0,0 +1,43 @@
|
|||||||
|
From 910e5782b7d9f222d4e34d3505d0d636ff757103 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chrostoper Ertl <chertl@microsoft.com>
|
||||||
|
Date: Thu, 28 Nov 2019 16:44:18 +0000
|
||||||
|
Subject: [PATCH 07/11] fru: Fix buffer overflow in ipmi_spd_print_fru
|
||||||
|
|
||||||
|
Partial fix for CVE-2020-5208, see
|
||||||
|
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
|
||||||
|
|
||||||
|
The `ipmi_spd_print_fru` function has a similar issue as the one fixed
|
||||||
|
by the previous commit in `read_fru_area_section`. An initial request is
|
||||||
|
made to get the `fru.size`, which is used as the size for the allocation
|
||||||
|
of `spd_data`. Inside a loop, further requests are performed to get the
|
||||||
|
copy sizes which are not checked before being used as the size for a
|
||||||
|
copy into the buffer.
|
||||||
|
---
|
||||||
|
lib/dimm_spd.c | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/lib/dimm_spd.c
|
||||||
|
+++ b/lib/dimm_spd.c
|
||||||
|
@@ -1621,7 +1621,7 @@ ipmi_spd_print_fru(struct ipmi_intf * in
|
||||||
|
struct ipmi_rq req;
|
||||||
|
struct fru_info fru;
|
||||||
|
uint8_t *spd_data, msg_data[4];
|
||||||
|
- int len, offset;
|
||||||
|
+ uint32_t len, offset;
|
||||||
|
|
||||||
|
msg_data[0] = id;
|
||||||
|
|
||||||
|
@@ -1697,6 +1697,13 @@ ipmi_spd_print_fru(struct ipmi_intf * in
|
||||||
|
}
|
||||||
|
|
||||||
|
len = rsp->data[0];
|
||||||
|
+ if(rsp->data_len < 1
|
||||||
|
+ || len > rsp->data_len - 1
|
||||||
|
+ || len > fru.size - offset)
|
||||||
|
+ {
|
||||||
|
+ printf(" Not enough buffer size");
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
memcpy(&spd_data[offset], rsp->data + 1, len);
|
||||||
|
offset += len;
|
||||||
|
} while (offset < fru.size);
|
@ -0,0 +1,43 @@
|
|||||||
|
From 4f7778ed232a92bde388f38917b94f458a82c78e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chrostoper Ertl <chertl@microsoft.com>
|
||||||
|
Date: Thu, 28 Nov 2019 16:51:49 +0000
|
||||||
|
Subject: [PATCH 08/11] session: Fix buffer overflow in ipmi_get_session_info
|
||||||
|
|
||||||
|
Partial fix for CVE-2020-5208, see
|
||||||
|
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
|
||||||
|
|
||||||
|
The `ipmi_get_session_info` function does not properly check the
|
||||||
|
response `data_len`, which is used as a copy size, allowing stack buffer
|
||||||
|
overflow.
|
||||||
|
---
|
||||||
|
lib/ipmi_session.c | 12 ++++++++----
|
||||||
|
1 file changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/ipmi_session.c
|
||||||
|
+++ b/lib/ipmi_session.c
|
||||||
|
@@ -309,8 +309,10 @@ ipmi_get_session_info(struct ipmi_intf
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
- memcpy(&session_info, rsp->data, rsp->data_len);
|
||||||
|
- print_session_info(&session_info, rsp->data_len);
|
||||||
|
+ memcpy(&session_info, rsp->data,
|
||||||
|
+ __min(rsp->data_len, sizeof(session_info)));
|
||||||
|
+ print_session_info(&session_info,
|
||||||
|
+ __min(rsp->data_len, sizeof(session_info)));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
@@ -341,8 +343,10 @@ ipmi_get_session_info(struct ipmi_intf
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
- memcpy(&session_info, rsp->data, rsp->data_len);
|
||||||
|
- print_session_info(&session_info, rsp->data_len);
|
||||||
|
+ memcpy(&session_info, rsp->data,
|
||||||
|
+ __min(rsp->data_len, sizeof(session_info)));
|
||||||
|
+ print_session_info(&session_info,
|
||||||
|
+ __min(rsp->data_len, sizeof(session_info)));
|
||||||
|
|
||||||
|
} while (i <= session_info.session_slot_count);
|
||||||
|
break;
|
@ -0,0 +1,32 @@
|
|||||||
|
From 743dd4faa302f22950e4438cf684e1e398eb47eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chrostoper Ertl <chertl@microsoft.com>
|
||||||
|
Date: Thu, 28 Nov 2019 16:56:38 +0000
|
||||||
|
Subject: [PATCH 09/11] channel: Fix buffer overflow
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Partial fix for CVE-2020-5208, see
|
||||||
|
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
|
||||||
|
|
||||||
|
The `ipmi_get_channel_cipher_suites` function does not properly check
|
||||||
|
the final response’s `data_len`, which can lead to stack buffer overflow
|
||||||
|
on the final copy.
|
||||||
|
---
|
||||||
|
lib/ipmi_channel.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/lib/ipmi_channel.c
|
||||||
|
+++ b/lib/ipmi_channel.c
|
||||||
|
@@ -413,7 +413,10 @@ ipmi_get_channel_cipher_suites(struct ip
|
||||||
|
lprintf(LOG_ERR, "Unable to Get Channel Cipher Suites");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
- if (rsp->ccode > 0) {
|
||||||
|
+ if (rsp->ccode
|
||||||
|
+ || rsp->data_len < 1
|
||||||
|
+ || rsp->data_len > sizeof(uint8_t) + 0x10)
|
||||||
|
+ {
|
||||||
|
lprintf(LOG_ERR, "Get Channel Cipher Suites failed: %s",
|
||||||
|
val2str(rsp->ccode, completion_code_vals));
|
||||||
|
return -1;
|
@ -0,0 +1,83 @@
|
|||||||
|
From e048e9c65a52f0879d482531e70735c1d314d43a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chrostoper Ertl <chertl@microsoft.com>
|
||||||
|
Date: Thu, 28 Nov 2019 17:06:39 +0000
|
||||||
|
Subject: [PATCH 10/11] lanp: Fix buffer overflows in get_lan_param_select
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Partial fix for CVE-2020-5208, see
|
||||||
|
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
|
||||||
|
|
||||||
|
The `get_lan_param_select` function is missing a validation check on the
|
||||||
|
response’s `data_len`, which it then returns to caller functions, where
|
||||||
|
stack buffer overflow can occur.
|
||||||
|
---
|
||||||
|
lib/ipmi_lanp.c | 14 +++++++-------
|
||||||
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/ipmi_lanp.c
|
||||||
|
+++ b/lib/ipmi_lanp.c
|
||||||
|
@@ -1809,7 +1809,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in
|
||||||
|
if (p == NULL) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
- memcpy(data, p->data, p->data_len);
|
||||||
|
+ memcpy(data, p->data, __min(p->data_len, sizeof(data)));
|
||||||
|
/* set new ipaddr */
|
||||||
|
memcpy(data+3, temp, 4);
|
||||||
|
printf("Setting LAN Alert %d IP Address to %d.%d.%d.%d\n", alert,
|
||||||
|
@@ -1824,7 +1824,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in
|
||||||
|
if (p == NULL) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
- memcpy(data, p->data, p->data_len);
|
||||||
|
+ memcpy(data, p->data, __min(p->data_len, sizeof(data)));
|
||||||
|
/* set new macaddr */
|
||||||
|
memcpy(data+7, temp, 6);
|
||||||
|
printf("Setting LAN Alert %d MAC Address to "
|
||||||
|
@@ -1838,7 +1838,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in
|
||||||
|
if (p == NULL) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
- memcpy(data, p->data, p->data_len);
|
||||||
|
+ memcpy(data, p->data, __min(p->data_len, sizeof(data)));
|
||||||
|
|
||||||
|
if (strncasecmp(argv[1], "def", 3) == 0 ||
|
||||||
|
strncasecmp(argv[1], "default", 7) == 0) {
|
||||||
|
@@ -1864,7 +1864,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in
|
||||||
|
if (p == NULL) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
- memcpy(data, p->data, p->data_len);
|
||||||
|
+ memcpy(data, p->data, __min(p->data_len, sizeof(data)));
|
||||||
|
|
||||||
|
if (strncasecmp(argv[1], "on", 2) == 0 ||
|
||||||
|
strncasecmp(argv[1], "yes", 3) == 0) {
|
||||||
|
@@ -1889,7 +1889,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in
|
||||||
|
if (p == NULL) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
- memcpy(data, p->data, p->data_len);
|
||||||
|
+ memcpy(data, p->data, __min(p->data_len, sizeof(data)));
|
||||||
|
|
||||||
|
if (strncasecmp(argv[1], "pet", 3) == 0) {
|
||||||
|
printf("Setting LAN Alert %d destination to PET Trap\n", alert);
|
||||||
|
@@ -1917,7 +1917,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in
|
||||||
|
if (p == NULL) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
- memcpy(data, p->data, p->data_len);
|
||||||
|
+ memcpy(data, p->data, __min(p->data_len, sizeof(data)));
|
||||||
|
|
||||||
|
if (str2uchar(argv[1], &data[2]) != 0) {
|
||||||
|
lprintf(LOG_ERR, "Invalid time: %s", argv[1]);
|
||||||
|
@@ -1933,7 +1933,7 @@ ipmi_lan_alert_set(struct ipmi_intf * in
|
||||||
|
if (p == NULL) {
|
||||||
|
return (-1);
|
||||||
|
}
|
||||||
|
- memcpy(data, p->data, p->data_len);
|
||||||
|
+ memcpy(data, p->data, __min(p->data_len, sizeof(data)));
|
||||||
|
|
||||||
|
if (str2uchar(argv[1], &data[3]) != 0) {
|
||||||
|
lprintf(LOG_ERR, "Invalid retry: %s", argv[1]);
|
@ -0,0 +1,130 @@
|
|||||||
|
From 98b47424cf548f58c4d295fa8235210406ea85ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: Chrostoper Ertl <chertl@microsoft.com>
|
||||||
|
Date: Thu, 28 Nov 2019 17:13:45 +0000
|
||||||
|
Subject: [PATCH 11/11] fru, sdr: Fix id_string buffer overflows
|
||||||
|
|
||||||
|
Final part of the fixes for CVE-2020-5208, see
|
||||||
|
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
|
||||||
|
|
||||||
|
9 variants of stack buffer overflow when parsing `id_string` field of
|
||||||
|
SDR records returned from `CMD_GET_SDR` command.
|
||||||
|
|
||||||
|
SDR record structs have an `id_code` field, and an `id_string` `char`
|
||||||
|
array.
|
||||||
|
|
||||||
|
The length of `id_string` is calculated as `(id_code & 0x1f) + 1`,
|
||||||
|
which can be larger than expected 16 characters (if `id_code = 0xff`,
|
||||||
|
then length will be `(0xff & 0x1f) + 1 = 32`).
|
||||||
|
|
||||||
|
In numerous places, this can cause stack buffer overflow when copying
|
||||||
|
into fixed buffer of size `17` bytes from this calculated length.
|
||||||
|
---
|
||||||
|
lib/ipmi_fru.c | 2 +-
|
||||||
|
lib/ipmi_sdr.c | 40 ++++++++++++++++++++++++----------------
|
||||||
|
2 files changed, 25 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
--- a/lib/ipmi_fru.c
|
||||||
|
+++ b/lib/ipmi_fru.c
|
||||||
|
@@ -3062,7 +3062,7 @@ ipmi_fru_print(struct ipmi_intf * intf,
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
memset(desc, 0, sizeof(desc));
|
||||||
|
- memcpy(desc, fru->id_string, fru->id_code & 0x01f);
|
||||||
|
+ memcpy(desc, fru->id_string, __min(fru->id_code & 0x01f, sizeof(desc)));
|
||||||
|
desc[fru->id_code & 0x01f] = 0;
|
||||||
|
printf("FRU Device Description : %s (ID %d)\n", desc, fru->device_id);
|
||||||
|
|
||||||
|
--- a/lib/ipmi_sdr.c
|
||||||
|
+++ b/lib/ipmi_sdr.c
|
||||||
|
@@ -2084,7 +2084,7 @@ ipmi_sdr_print_sensor_eventonly(struct i
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
memset(desc, 0, sizeof (desc));
|
||||||
|
- snprintf(desc, (sensor->id_code & 0x1f) + 1, "%s", sensor->id_string);
|
||||||
|
+ snprintf(desc, sizeof(desc), "%.*s", (sensor->id_code & 0x1f) + 1, sensor->id_string);
|
||||||
|
|
||||||
|
if (verbose) {
|
||||||
|
printf("Sensor ID : %s (0x%x)\n",
|
||||||
|
@@ -2135,7 +2135,7 @@ ipmi_sdr_print_sensor_mc_locator(struct
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
memset(desc, 0, sizeof (desc));
|
||||||
|
- snprintf(desc, (mc->id_code & 0x1f) + 1, "%s", mc->id_string);
|
||||||
|
+ snprintf(desc, sizeof(desc), "%.*s", (mc->id_code & 0x1f) + 1, mc->id_string);
|
||||||
|
|
||||||
|
if (verbose == 0) {
|
||||||
|
if (csv_output)
|
||||||
|
@@ -2228,7 +2228,7 @@ ipmi_sdr_print_sensor_generic_locator(st
|
||||||
|
char desc[17];
|
||||||
|
|
||||||
|
memset(desc, 0, sizeof (desc));
|
||||||
|
- snprintf(desc, (dev->id_code & 0x1f) + 1, "%s", dev->id_string);
|
||||||
|
+ snprintf(desc, sizeof(desc), "%.*s", (dev->id_code & 0x1f) + 1, dev->id_string);
|
||||||
|
|
||||||
|
if (!verbose) {
|
||||||
|
if (csv_output)
|
||||||
|
@@ -2285,7 +2285,7 @@ ipmi_sdr_print_sensor_fru_locator(struct
|
||||||
|
char desc[17];
|
||||||
|
|
||||||
|
memset(desc, 0, sizeof (desc));
|
||||||
|
- snprintf(desc, (fru->id_code & 0x1f) + 1, "%s", fru->id_string);
|
||||||
|
+ snprintf(desc, sizeof(desc), "%.*s", (fru->id_code & 0x1f) + 1, fru->id_string);
|
||||||
|
|
||||||
|
if (!verbose) {
|
||||||
|
if (csv_output)
|
||||||
|
@@ -2489,35 +2489,43 @@ ipmi_sdr_print_name_from_rawentry(struct
|
||||||
|
|
||||||
|
int rc =0;
|
||||||
|
char desc[17];
|
||||||
|
+ const char *id_string;
|
||||||
|
+ uint8_t id_code;
|
||||||
|
memset(desc, ' ', sizeof (desc));
|
||||||
|
|
||||||
|
switch ( type) {
|
||||||
|
case SDR_RECORD_TYPE_FULL_SENSOR:
|
||||||
|
record.full = (struct sdr_record_full_sensor *) raw;
|
||||||
|
- snprintf(desc, (record.full->id_code & 0x1f) +1, "%s",
|
||||||
|
- (const char *)record.full->id_string);
|
||||||
|
+ id_code = record.full->id_code;
|
||||||
|
+ id_string = record.full->id_string;
|
||||||
|
break;
|
||||||
|
+
|
||||||
|
case SDR_RECORD_TYPE_COMPACT_SENSOR:
|
||||||
|
record.compact = (struct sdr_record_compact_sensor *) raw ;
|
||||||
|
- snprintf(desc, (record.compact->id_code & 0x1f) +1, "%s",
|
||||||
|
- (const char *)record.compact->id_string);
|
||||||
|
+ id_code = record.compact->id_code;
|
||||||
|
+ id_string = record.compact->id_string;
|
||||||
|
break;
|
||||||
|
+
|
||||||
|
case SDR_RECORD_TYPE_EVENTONLY_SENSOR:
|
||||||
|
record.eventonly = (struct sdr_record_eventonly_sensor *) raw ;
|
||||||
|
- snprintf(desc, (record.eventonly->id_code & 0x1f) +1, "%s",
|
||||||
|
- (const char *)record.eventonly->id_string);
|
||||||
|
- break;
|
||||||
|
+ id_code = record.eventonly->id_code;
|
||||||
|
+ id_string = record.eventonly->id_string;
|
||||||
|
+ break;
|
||||||
|
+
|
||||||
|
case SDR_RECORD_TYPE_MC_DEVICE_LOCATOR:
|
||||||
|
record.mcloc = (struct sdr_record_mc_locator *) raw ;
|
||||||
|
- snprintf(desc, (record.mcloc->id_code & 0x1f) +1, "%s",
|
||||||
|
- (const char *)record.mcloc->id_string);
|
||||||
|
+ id_code = record.mcloc->id_code;
|
||||||
|
+ id_string = record.mcloc->id_string;
|
||||||
|
break;
|
||||||
|
+
|
||||||
|
default:
|
||||||
|
rc = -1;
|
||||||
|
- break;
|
||||||
|
- }
|
||||||
|
+ }
|
||||||
|
+ if (!rc) {
|
||||||
|
+ snprintf(desc, sizeof(desc), "%.*s", (id_code & 0x1f) + 1, id_string);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc);
|
||||||
|
+ lprintf(LOG_INFO, "ID: 0x%04x , NAME: %-16s", id, desc);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
33
packages/admin/ipmitool/patches/0012-gcc10.patch
Normal file
33
packages/admin/ipmitool/patches/0012-gcc10.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From c3939dac2c060651361fc71516806f9ab8c38901 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vaclav Dolezal <vdolezal@redhat.com>
|
||||||
|
Date: Thu, 23 Jan 2020 11:26:32 +0100
|
||||||
|
Subject: [PATCH] hpmfwupg: move variable definition to .c file
|
||||||
|
|
||||||
|
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
|
||||||
|
---
|
||||||
|
include/ipmitool/ipmi_hpmfwupg.h | 2 +-
|
||||||
|
lib/ipmi_hpmfwupg.c | 2 ++
|
||||||
|
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
--- a/include/ipmitool/ipmi_hpmfwupg.h
|
||||||
|
+++ b/include/ipmitool/ipmi_hpmfwupg.h
|
||||||
|
@@ -800,7 +800,7 @@ typedef struct _VERSIONINFO {
|
||||||
|
char descString[HPMFWUPG_DESC_STRING_LENGTH + 1];
|
||||||
|
}VERSIONINFO, *PVERSIONINFO;
|
||||||
|
|
||||||
|
-VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
|
||||||
|
+extern VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
|
||||||
|
|
||||||
|
#define TARGET_VER (0x01)
|
||||||
|
#define ROLLBACK_VER (0x02)
|
||||||
|
--- a/lib/ipmi_hpmfwupg.c
|
||||||
|
+++ b/lib/ipmi_hpmfwupg.c
|
||||||
|
@@ -58,6 +58,8 @@ ipmi_intf_get_max_request_data_size(stru
|
||||||
|
|
||||||
|
extern int verbose;
|
||||||
|
|
||||||
|
+VERSIONINFO gVersionInfo[HPMFWUPG_COMPONENT_ID_MAX];
|
||||||
|
+
|
||||||
|
int HpmfwupgUpgrade(struct ipmi_intf *intf, char *imageFilename,
|
||||||
|
int activate, int, int);
|
||||||
|
int HpmfwupgValidateImageIntegrity(struct HpmfwupgUpgradeCtx *pFwupgCtx);
|
103
packages/admin/monit/Makefile
Normal file
103
packages/admin/monit/Makefile
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2006-2014 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=monit
|
||||||
|
PKG_VERSION:=5.34.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://bitbucket.org/tildeslash/monit/downloads/
|
||||||
|
PKG_HASH:=37f514cd8973bbce104cb8517ff3fc504052a083703eee0d0e873db26b919820
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Yaroslav Petrov <info@lank.me>
|
||||||
|
PKG_LICENSE:=AGPL-3.0
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:tildeslash:monit
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/monit/Default
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
DEPENDS:= +libpthread +zlib
|
||||||
|
TITLE:=System services monitoring utility
|
||||||
|
URL:=https://mmonit.com/monit/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/monit/Default/description
|
||||||
|
An utility for monitoring services on a Unix system
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/monit
|
||||||
|
$(call Package/monit/Default)
|
||||||
|
DEPENDS+= +libopenssl
|
||||||
|
TITLE+= (with SSL support)
|
||||||
|
VARIANT:=ssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/monit/description
|
||||||
|
$(call Package/monit/Default/description)
|
||||||
|
This package is built with SSL support.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/monit-nossl
|
||||||
|
$(call Package/monit/Default)
|
||||||
|
TITLE+= (without SSL support)
|
||||||
|
VARIANT:=nossl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/monit-nossl/description
|
||||||
|
$(call Package/monit/Default/description)
|
||||||
|
This package is built without SSL support.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--with-piddir="/var/run" \
|
||||||
|
--without-pam \
|
||||||
|
ac_cv_ipv6=$(if $(CONFIG_IPV6),yes,no) \
|
||||||
|
libmonit_cv_setjmp_available=yes \
|
||||||
|
libmonit_cv_vsnprintf_c99_conformant=yes
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),ssl)
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--with-ssl \
|
||||||
|
--with-ssl-dir="$(STAGING_DIR)/usr"
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),nossl)
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--without-ssl
|
||||||
|
endif
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
$(Build/Prepare/Default)
|
||||||
|
(cd $(PKG_BUILD_DIR) && ./bootstrap)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/monit/conffiles
|
||||||
|
/etc/monitrc
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/monit/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc
|
||||||
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/monitrc $(1)/etc/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/monit.init $(1)/etc/init.d/monit
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/monit $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
Package/monit-nossl/conffiles = $(Package/monit/conffiles)
|
||||||
|
Package/monit-nossl/install = $(Package/monit/install)
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,monit))
|
||||||
|
$(eval $(call BuildPackage,monit-nossl))
|
15
packages/admin/monit/files/monit.init
Normal file
15
packages/admin/monit/files/monit.init
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2014 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
|
USE_PROCD=1
|
||||||
|
PROG=/usr/bin/monit
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
[ -f /etc/monitrc ] || { echo "monit: /etc/monitrc is missing"; return 1; }
|
||||||
|
chmod 0600 /etc/monitrc
|
||||||
|
procd_open_instance
|
||||||
|
# -I runs in foreground, as procd requires
|
||||||
|
procd_set_param command "$PROG" -I
|
||||||
|
procd_close_instance
|
||||||
|
}
|
49
packages/admin/muninlite/Makefile
Normal file
49
packages/admin/muninlite/Makefile
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2006-2014 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=muninlite
|
||||||
|
PKG_VERSION:=2.1.2
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://github.com/munin-monitoring/$(PKG_NAME)/releases/download/$(PKG_VERSION)/
|
||||||
|
PKG_HASH:=5a49da30944f3b85a0030b661a27e84c06c7f640050802e799304b11cc635ffc
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Jonathan McCrohan <jmccrohan@gmail.com>
|
||||||
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/muninlite
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
DEPENDS:=+xinetd
|
||||||
|
TITLE:=Munin node implemented in shell
|
||||||
|
URL:=https://github.com/munin-monitoring/muninlite
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/muninlite/Default/description
|
||||||
|
Munin node implemented in shell.
|
||||||
|
Munin is a monitoring system for Unix networks.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/muninlite/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/muninlite $(1)/usr/sbin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/xinetd.d
|
||||||
|
$(INSTALL_DATA) ./files/etc/xinetd.d/muninlite $(1)/etc/xinetd.d/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/munin/plugins
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/muninlite/conffiles
|
||||||
|
/etc/xinetd.d/muninlite
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,muninlite))
|
10
packages/admin/muninlite/files/etc/xinetd.d/muninlite
Normal file
10
packages/admin/muninlite/files/etc/xinetd.d/muninlite
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
service munin
|
||||||
|
{
|
||||||
|
socket_type = stream
|
||||||
|
protocol = tcp
|
||||||
|
wait = no
|
||||||
|
user = root
|
||||||
|
group = root
|
||||||
|
server = /usr/sbin/muninlite
|
||||||
|
disable = no
|
||||||
|
}
|
86
packages/admin/netatop/Makefile
Normal file
86
packages/admin/netatop/Makefile
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=netatop
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_VERSION:=3.1
|
||||||
|
PKG_LICENSE:=GPL-2.0
|
||||||
|
PKG_SOURCE_URL:=https://www.atoptool.nl/download/
|
||||||
|
PKG_HASH:=736f43572c31a90748f023f0a5a814bff58d44c0c3f060d776cfd6e6e8435c62
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_MAINTAINER:=Toni Uhlig <matzeton@googlemail.com>
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
|
define KernelPackage/netatop
|
||||||
|
URL:=https://www.atoptool.nl/
|
||||||
|
CATEGORY:=Kernel modules
|
||||||
|
SUBMENU:=Netfilter Extensions
|
||||||
|
TITLE:=netatop netfilter module
|
||||||
|
FILES:= \
|
||||||
|
$(PKG_BUILD_DIR)/module/netatop.$(LINUX_KMOD_SUFFIX)
|
||||||
|
AUTOLOAD:=$(call AutoProbe,netatop)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define KernelPackage/netatop/description
|
||||||
|
The optional kernel module netatop can be loaded to gather statistics about
|
||||||
|
the TCP and UDP packets that have been transmitted/received per process and
|
||||||
|
per thread. As soon as atop discovers that this module is active, it shows
|
||||||
|
the columns SNET and RNET in the generic screen for the number of transmitted
|
||||||
|
and received packets per process. When the 'n' key is pressed, it shows
|
||||||
|
detailed counters about the number packets transmitted/received via TCP and
|
||||||
|
UDP, the average sizes of these packets, and the total bandwidth consumed
|
||||||
|
for input and output per process/thread.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netatop
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=network counter for atop
|
||||||
|
DEPENDS:=+zlib +kmod-netatop
|
||||||
|
URL:=https://www.atoptool.nl/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netatop/description
|
||||||
|
The daemon netatopd is packaged with the netatop kernel module. This
|
||||||
|
daemon takes care that information is gathered about processes that are
|
||||||
|
finished. For every finished process that has transferred network packets,
|
||||||
|
a binary record is written to a dedicated logfile. The added records in the
|
||||||
|
logfile are read by atop with every sample to show information about the
|
||||||
|
network activity of finished processes as well.
|
||||||
|
endef
|
||||||
|
|
||||||
|
NETATOP_KMOD_MAKEOPTS= \
|
||||||
|
ARCH="$(LINUX_KARCH)" \
|
||||||
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
|
KERNDIR="$(LINUX_DIR)"
|
||||||
|
NETATOP_DAEMON_MAKEOPTS= \
|
||||||
|
CC="$(TARGET_CC)" \
|
||||||
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
LDFLAGS="$(TARGET_LDFLAGS)"
|
||||||
|
|
||||||
|
define Build/Compile/netatop
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR)/module \
|
||||||
|
$(NETATOP_KMOD_MAKEOPTS) \
|
||||||
|
netatop.$(LINUX_KMOD_SUFFIX)
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR)/daemon \
|
||||||
|
$(NETATOP_DAEMON_MAKEOPTS) \
|
||||||
|
all
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(call Build/Compile/netatop)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netatop/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin/
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/daemon/netatopd $(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,netatop))
|
||||||
|
$(eval $(call BuildPackage,netatop))
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/daemon/Makefile
|
||||||
|
+++ b/daemon/Makefile
|
||||||
|
@@ -6,7 +6,7 @@ THISDIR = $(shell pwd)
|
||||||
|
all: netatopd
|
||||||
|
|
||||||
|
netatopd: netatopd.o Makefile
|
||||||
|
- $(CC) netatopd.o -o netatopd -lz
|
||||||
|
+ $(CC) $(LDFLAGS) netatopd.o -o netatopd -lz
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o netatopd
|
@ -0,0 +1,11 @@
|
|||||||
|
--- a/module/netatop.c
|
||||||
|
+++ b/module/netatop.c
|
||||||
|
@@ -1617,7 +1617,7 @@ getsockopt(struct sock *sk, int cmd, void __user *user, int *len)
|
||||||
|
|
||||||
|
case NETATOP_GETCNT_TGID:
|
||||||
|
tasktype = 'g';
|
||||||
|
- // fall through
|
||||||
|
+ fallthrough;
|
||||||
|
case NETATOP_GETCNT_PID:
|
||||||
|
if (*len < sizeof(pid_t))
|
||||||
|
return -EINVAL;
|
104
packages/admin/netdata/Makefile
Normal file
104
packages/admin/netdata/Makefile
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2008-2016 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=netdata
|
||||||
|
PKG_VERSION:=1.38.1
|
||||||
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>, Daniel Engberg <daniel.engberg.lists@pyret.net>
|
||||||
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:my-netdata:netdata
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://github.com/netdata/netdata/releases/download/v$(PKG_VERSION)
|
||||||
|
PKG_HASH:=e32a5427f0c00550210dbbf0046c2621313955256edf836db686e2bc270b8d10
|
||||||
|
PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-v$(PKG_VERSION)
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_BUILD_DEPENDS:=protobuf/host
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
PKG_BUILD_FLAGS:=no-mips16 gc-sections
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/netdata
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
DEPENDS:=+zlib +libuuid +libuv +libmnl +libjson-c +libopenssl \
|
||||||
|
+libstdcpp +libatomic +protobuf +openssl-util +curl +bash
|
||||||
|
TITLE:=Real-time performance monitoring tool
|
||||||
|
URL:=https://www.netdata.cloud/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netdata/description
|
||||||
|
netdata is a highly optimized Linux daemon providing real-time performance
|
||||||
|
monitoring for Linux systems, applications and SNMP devices over the web.
|
||||||
|
|
||||||
|
If you want to use Python plugins install python3, python3-yaml and
|
||||||
|
python3-urllib3
|
||||||
|
endef
|
||||||
|
|
||||||
|
TARGET_CFLAGS := $(filter-out -O%,$(TARGET_CFLAGS)) -O3
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--with-zlib \
|
||||||
|
--with-math \
|
||||||
|
--disable-x86-sse \
|
||||||
|
--enable-lto \
|
||||||
|
--disable-ebpf \
|
||||||
|
--without-libcap \
|
||||||
|
--disable-dbengine \
|
||||||
|
--disable-compression \
|
||||||
|
--disable-plugin-nfacct \
|
||||||
|
--disable-plugin-freeipmi \
|
||||||
|
--disable-plugin-cups \
|
||||||
|
--disable-plugin-xenstat \
|
||||||
|
--disable-exporting-prometheus-remote-write \
|
||||||
|
--disable-unit-tests \
|
||||||
|
--disable-ml
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
$(SED) 's/m4_esyscmd(\[git describe .*\])/$(PKG_VERSION)/' $(PKG_BUILD_DIR)/configure.ac
|
||||||
|
$(Build/Configure/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netdata/conffiles
|
||||||
|
/etc/netdata/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netdata/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc/netdata/custom-plugins.d
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/etc/netdata $(1)/etc
|
||||||
|
$(CP) ./files/netdata.conf $(1)/etc/netdata
|
||||||
|
touch $(1)/etc/netdata/.opt-out-from-anonymous-statistics
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/netdata $(1)/usr/lib
|
||||||
|
$(CP) $(1)/usr/lib/netdata/conf.d/health_alarm_notify.conf $(1)/etc
|
||||||
|
$(CP) $(1)/usr/lib/netdata/plugins.d/tc-qos-helper.sh $(1)/etc
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdatacli $(1)/usr/sbin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/netdata-claim.sh $(1)/usr/sbin
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/netdata
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/netdata $(1)/usr/share
|
||||||
|
rm $(1)/usr/share/netdata/web/demo*html
|
||||||
|
rm $(1)/usr/share/netdata/web/fonts/*.svg
|
||||||
|
rm $(1)/usr/share/netdata/web/fonts/*.ttf
|
||||||
|
rm $(1)/usr/share/netdata/web/fonts/*.woff
|
||||||
|
rm $(1)/usr/share/netdata/web/images/*.png
|
||||||
|
rm $(1)/usr/share/netdata/web/images/*.gif
|
||||||
|
rm $(1)/usr/share/netdata/web/images/*.ico
|
||||||
|
rm -rf $(1)/usr/share/netdata/web/old
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/netdata.init $(1)/etc/init.d/netdata
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,netdata))
|
32
packages/admin/netdata/files/netdata.conf
Normal file
32
packages/admin/netdata/files/netdata.conf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Full configuration can be retrieved from the running
|
||||||
|
# server at http://localhost:19999/netdata.conf
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# curl -o /etc/netdata/netdata.conf http://localhost:19999/netdata.conf
|
||||||
|
#
|
||||||
|
|
||||||
|
[global]
|
||||||
|
update every = 2
|
||||||
|
memory deduplication (ksm) = no
|
||||||
|
debug log = syslog
|
||||||
|
error log = syslog
|
||||||
|
access log = none
|
||||||
|
run as user = root
|
||||||
|
|
||||||
|
[web]
|
||||||
|
allow connections from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
|
||||||
|
allow dashboard from = localhost 10.* 192.168.* 172.16.* 172.17.* 172.18.* 172.19.* 172.20.* 172.21.* 172.22.* 172.23.* 172.24.* 172.25.* 172.26.* 172.27.* 172.28.* 172.29.* 172.30.* 172.31.*
|
||||||
|
|
||||||
|
[plugins]
|
||||||
|
cgroups = no
|
||||||
|
apps = no
|
||||||
|
charts.d = no
|
||||||
|
fping = no
|
||||||
|
node.d = no
|
||||||
|
python.d = no
|
||||||
|
|
||||||
|
[health]
|
||||||
|
enabled = no
|
||||||
|
|
||||||
|
[plugin:proc:ipc]
|
||||||
|
shared memory totals = no
|
29
packages/admin/netdata/files/netdata.init
Normal file
29
packages/admin/netdata/files/netdata.init
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=99
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
APPBINARY=/usr/sbin/netdata
|
||||||
|
CONFIGFILE=/etc/netdata/netdata.conf
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
local cloud_claim_token cloud_claim_rooms
|
||||||
|
config_get cloud_claim_token "config" "cloud_claim_token"
|
||||||
|
config_get cloud_claim_rooms "config" "cloud_claim_rooms"
|
||||||
|
|
||||||
|
mkdir -m 0755 -p /var/cache/netdata
|
||||||
|
chown nobody /var/cache/netdata
|
||||||
|
mkdir -m 0755 -p /var/lib/netdata
|
||||||
|
chown nobody /var/lib/netdata
|
||||||
|
mkdir -m 0755 -p /var/log/netdata
|
||||||
|
chown nobody /var/log/netdata
|
||||||
|
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command $APPBINARY -D -c $CONFIGFILE
|
||||||
|
if [ -n "$cloud_claim_token" ] && [ -n "$cloud_claim_rooms" ]; then
|
||||||
|
procd_append_param command -W "claim -token=$cloud_claim_token -rooms=$cloud_claim_rooms"
|
||||||
|
fi
|
||||||
|
procd_set_param file $CONFIGFILE
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_close_instance
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
--- a/collectors/charts.d.plugin/charts.d.conf
|
||||||
|
+++ b/collectors/charts.d.plugin/charts.d.conf
|
||||||
|
@@ -30,7 +30,7 @@
|
||||||
|
|
||||||
|
# the default enable/disable for all charts.d collectors
|
||||||
|
# the default is "yes"
|
||||||
|
-# enable_all_charts="yes"
|
||||||
|
+enable_all_charts="no"
|
||||||
|
|
||||||
|
# BY DEFAULT ENABLED MODULES
|
||||||
|
# ap=yes
|
||||||
|
--- a/collectors/python.d.plugin/python.d.conf
|
||||||
|
+++ b/collectors/python.d.plugin/python.d.conf
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
#
|
||||||
|
|
||||||
|
# Enable / disable the whole python.d.plugin (all its modules)
|
||||||
|
-enabled: yes
|
||||||
|
+enabled: no
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# Enable / Disable python.d.plugin modules
|
@ -0,0 +1,112 @@
|
|||||||
|
--- a/collectors/python.d.plugin/Makefile.am
|
||||||
|
+++ b/collectors/python.d.plugin/Makefile.am
|
||||||
|
@@ -124,109 +124,3 @@ dist_third_party_DATA = \
|
||||||
|
python_modules/third_party/monotonic.py \
|
||||||
|
python_modules/third_party/filelock.py \
|
||||||
|
$(NULL)
|
||||||
|
-
|
||||||
|
-pythonyaml2dir=$(pythonmodulesdir)/pyyaml2
|
||||||
|
-dist_pythonyaml2_DATA = \
|
||||||
|
- python_modules/pyyaml2/__init__.py \
|
||||||
|
- python_modules/pyyaml2/composer.py \
|
||||||
|
- python_modules/pyyaml2/constructor.py \
|
||||||
|
- python_modules/pyyaml2/cyaml.py \
|
||||||
|
- python_modules/pyyaml2/dumper.py \
|
||||||
|
- python_modules/pyyaml2/emitter.py \
|
||||||
|
- python_modules/pyyaml2/error.py \
|
||||||
|
- python_modules/pyyaml2/events.py \
|
||||||
|
- python_modules/pyyaml2/loader.py \
|
||||||
|
- python_modules/pyyaml2/nodes.py \
|
||||||
|
- python_modules/pyyaml2/parser.py \
|
||||||
|
- python_modules/pyyaml2/reader.py \
|
||||||
|
- python_modules/pyyaml2/representer.py \
|
||||||
|
- python_modules/pyyaml2/resolver.py \
|
||||||
|
- python_modules/pyyaml2/scanner.py \
|
||||||
|
- python_modules/pyyaml2/serializer.py \
|
||||||
|
- python_modules/pyyaml2/tokens.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-pythonyaml3dir=$(pythonmodulesdir)/pyyaml3
|
||||||
|
-dist_pythonyaml3_DATA = \
|
||||||
|
- python_modules/pyyaml3/__init__.py \
|
||||||
|
- python_modules/pyyaml3/composer.py \
|
||||||
|
- python_modules/pyyaml3/constructor.py \
|
||||||
|
- python_modules/pyyaml3/cyaml.py \
|
||||||
|
- python_modules/pyyaml3/dumper.py \
|
||||||
|
- python_modules/pyyaml3/emitter.py \
|
||||||
|
- python_modules/pyyaml3/error.py \
|
||||||
|
- python_modules/pyyaml3/events.py \
|
||||||
|
- python_modules/pyyaml3/loader.py \
|
||||||
|
- python_modules/pyyaml3/nodes.py \
|
||||||
|
- python_modules/pyyaml3/parser.py \
|
||||||
|
- python_modules/pyyaml3/reader.py \
|
||||||
|
- python_modules/pyyaml3/representer.py \
|
||||||
|
- python_modules/pyyaml3/resolver.py \
|
||||||
|
- python_modules/pyyaml3/scanner.py \
|
||||||
|
- python_modules/pyyaml3/serializer.py \
|
||||||
|
- python_modules/pyyaml3/tokens.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-python_urllib3dir=$(pythonmodulesdir)/urllib3
|
||||||
|
-dist_python_urllib3_DATA = \
|
||||||
|
- python_modules/urllib3/__init__.py \
|
||||||
|
- python_modules/urllib3/_collections.py \
|
||||||
|
- python_modules/urllib3/connection.py \
|
||||||
|
- python_modules/urllib3/connectionpool.py \
|
||||||
|
- python_modules/urllib3/exceptions.py \
|
||||||
|
- python_modules/urllib3/fields.py \
|
||||||
|
- python_modules/urllib3/filepost.py \
|
||||||
|
- python_modules/urllib3/response.py \
|
||||||
|
- python_modules/urllib3/poolmanager.py \
|
||||||
|
- python_modules/urllib3/request.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-python_urllib3_utildir=$(python_urllib3dir)/util
|
||||||
|
-dist_python_urllib3_util_DATA = \
|
||||||
|
- python_modules/urllib3/util/__init__.py \
|
||||||
|
- python_modules/urllib3/util/connection.py \
|
||||||
|
- python_modules/urllib3/util/request.py \
|
||||||
|
- python_modules/urllib3/util/response.py \
|
||||||
|
- python_modules/urllib3/util/retry.py \
|
||||||
|
- python_modules/urllib3/util/selectors.py \
|
||||||
|
- python_modules/urllib3/util/ssl_.py \
|
||||||
|
- python_modules/urllib3/util/timeout.py \
|
||||||
|
- python_modules/urllib3/util/url.py \
|
||||||
|
- python_modules/urllib3/util/wait.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-python_urllib3_packagesdir=$(python_urllib3dir)/packages
|
||||||
|
-dist_python_urllib3_packages_DATA = \
|
||||||
|
- python_modules/urllib3/packages/__init__.py \
|
||||||
|
- python_modules/urllib3/packages/ordered_dict.py \
|
||||||
|
- python_modules/urllib3/packages/six.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-python_urllib3_backportsdir=$(python_urllib3_packagesdir)/backports
|
||||||
|
-dist_python_urllib3_backports_DATA = \
|
||||||
|
- python_modules/urllib3/packages/backports/__init__.py \
|
||||||
|
- python_modules/urllib3/packages/backports/makefile.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-python_urllib3_ssl_match_hostnamedir=$(python_urllib3_packagesdir)/ssl_match_hostname
|
||||||
|
-dist_python_urllib3_ssl_match_hostname_DATA = \
|
||||||
|
- python_modules/urllib3/packages/ssl_match_hostname/__init__.py \
|
||||||
|
- python_modules/urllib3/packages/ssl_match_hostname/_implementation.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-python_urllib3_contribdir=$(python_urllib3dir)/contrib
|
||||||
|
-dist_python_urllib3_contrib_DATA = \
|
||||||
|
- python_modules/urllib3/contrib/__init__.py \
|
||||||
|
- python_modules/urllib3/contrib/appengine.py \
|
||||||
|
- python_modules/urllib3/contrib/ntlmpool.py \
|
||||||
|
- python_modules/urllib3/contrib/pyopenssl.py \
|
||||||
|
- python_modules/urllib3/contrib/securetransport.py \
|
||||||
|
- python_modules/urllib3/contrib/socks.py \
|
||||||
|
- $(NULL)
|
||||||
|
-
|
||||||
|
-python_urllib3_securetransportdir=$(python_urllib3_contribdir)/_securetransport
|
||||||
|
-dist_python_urllib3_securetransport_DATA = \
|
||||||
|
- python_modules/urllib3/contrib/_securetransport/__init__.py \
|
||||||
|
- python_modules/urllib3/contrib/_securetransport/bindings.py \
|
||||||
|
- python_modules/urllib3/contrib/_securetransport/low_level.py \
|
||||||
|
- $(NULL)
|
@ -0,0 +1,14 @@
|
|||||||
|
--- a/collectors/python.d.plugin/python_modules/bases/loaders.py
|
||||||
|
+++ b/collectors/python.d.plugin/python_modules/bases/loaders.py
|
||||||
|
@@ -10,9 +10,9 @@ PY_VERSION = version_info[:2]
|
||||||
|
|
||||||
|
try:
|
||||||
|
if PY_VERSION > (3, 1):
|
||||||
|
- from pyyaml3 import SafeLoader as YamlSafeLoader
|
||||||
|
+ from yaml import SafeLoader as YamlSafeLoader
|
||||||
|
else:
|
||||||
|
- from pyyaml2 import SafeLoader as YamlSafeLoader
|
||||||
|
+ from yaml import SafeLoader as YamlSafeLoader
|
||||||
|
except ImportError:
|
||||||
|
from yaml import SafeLoader as YamlSafeLoader
|
||||||
|
|
387
packages/admin/netdata/patches/004-fix-libjudy-compile.patch
Normal file
387
packages/admin/netdata/patches/004-fix-libjudy-compile.patch
Normal file
@ -0,0 +1,387 @@
|
|||||||
|
--- a/.gitignore
|
||||||
|
+++ b/.gitignore
|
||||||
|
@@ -227,7 +227,3 @@ Session.*.vim
|
||||||
|
|
||||||
|
# Jupyter notebook checkpoints
|
||||||
|
.ipynb_checkpoints
|
||||||
|
-
|
||||||
|
-# Judy stuff
|
||||||
|
-JudyLTables.c
|
||||||
|
-judyltablesgen
|
||||||
|
--- a/Makefile.am
|
||||||
|
+++ b/Makefile.am
|
||||||
|
@@ -503,15 +503,10 @@ libjudy_a_SOURCES = libnetdata/libjudy/s
|
||||||
|
libnetdata/libjudy/src/JudyL/JudyLNextEmpty.c \
|
||||||
|
libnetdata/libjudy/src/JudyL/JudyLPrev.c \
|
||||||
|
libnetdata/libjudy/src/JudyL/JudyLPrevEmpty.c \
|
||||||
|
+ libnetdata/libjudy/src/JudyL/JudyLTables.c \
|
||||||
|
libnetdata/libjudy/src/JudyHS/JudyHS.c \
|
||||||
|
$(NULL)
|
||||||
|
|
||||||
|
-nodist_libjudy_a_SOURCES = JudyLTables.c
|
||||||
|
-
|
||||||
|
-BUILT_SOURCES += JudyLTables.c
|
||||||
|
-
|
||||||
|
-CLEANFILES += JudyLTables.c
|
||||||
|
-
|
||||||
|
libjudy_a_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough
|
||||||
|
|
||||||
|
libnetdata/libjudy/src/JudyL/libjudy_a-JudyLPrev.$(OBJEXT) : CFLAGS += -DJUDYPREV
|
||||||
|
@@ -521,16 +516,6 @@ libnetdata/libjudy/src/JudyL/libjudy_a-J
|
||||||
|
libnetdata/libjudy/src/JudyL/libjudy_a-JudyLByCount.$(OBJEXT) : CFLAGS += -DNOSMARTJBB -DNOSMARTJBU -DNOSMARTJLB
|
||||||
|
libnetdata/libjudy/src/JudyL/libjudy_a-j__udyLGet.$(OBJEXT) : CFLAGS += -DJUDYGETINLINE
|
||||||
|
|
||||||
|
-noinst_PROGRAMS = judyltablesgen
|
||||||
|
-
|
||||||
|
-judyltablesgen_SOURCES = libnetdata/libjudy/src/JudyL/JudyLTablesGen.c
|
||||||
|
-judyltablesgen_CFLAGS = $(LIBJUDY_CFLAGS) -DJUDYL -I$(abs_top_srcdir)/libnetdata/libjudy/src -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyCommon -Wno-sign-compare -Wno-implicit-fallthrough
|
||||||
|
-
|
||||||
|
-$(builddir)/judyltablesgen$(EXEEXT) : CFLAGS += -Wno-format -Wno-format-security
|
||||||
|
-
|
||||||
|
-JudyLTables.c: $(abs_top_srcdir)/libnetdata/libjudy/src/JudyL/JudyLTablesGen.c $(builddir)/judyltablesgen$(EXEEXT)
|
||||||
|
- $(builddir)/judyltablesgen$(EXEEXT)
|
||||||
|
-
|
||||||
|
libjudy_a-JudyLTables.$(OBJEXT) : CFLAGS += -I$(abs_top_srcdir)/libnetdata/libjudy/src/JudyL
|
||||||
|
|
||||||
|
if ENABLE_DBENGINE
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/libnetdata/libjudy/src/JudyL/JudyLTables.c
|
||||||
|
@@ -0,0 +1,338 @@
|
||||||
|
+// @(#) From generation tool: $Revision: 4.37 $ $Source: /judy/src/JudyCommon/JudyTables.c $
|
||||||
|
+// Pregenerated and modified by hand. Do not overwrite!
|
||||||
|
+
|
||||||
|
+#include "JudyL.h"
|
||||||
|
+// Leave the malloc() sizes readable in the binary (via strings(1)):
|
||||||
|
+#ifdef JU_64BIT
|
||||||
|
+const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 13";
|
||||||
|
+#else // JU_32BIT
|
||||||
|
+const char * JudyLMallocSizes = "JudyLMallocSizes = 3, 5, 7, 11, 15, 23, 32, 47, 64, Leaf1 = 25";
|
||||||
|
+#endif // JU_64BIT
|
||||||
|
+
|
||||||
|
+#ifdef JU_64BIT
|
||||||
|
+// object uses 64 words
|
||||||
|
+// cJU_BITSPERSUBEXPB = 32
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||||
|
+ 23, 23, 23, 32, 32, 32, 32, 32,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 64,
|
||||||
|
+ 64, 64, 64, 64, 64, 64, 64, 64
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 15 words
|
||||||
|
+// cJL_LEAF1_MAXPOP1 = 13
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 5, 5, 7, 7, 11, 11,
|
||||||
|
+ 11, 15, 15, 15, 15
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 1, 1, 1, 1, 1, 2, 2,
|
||||||
|
+ 2, 2, 2, 2, 2
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 64 words
|
||||||
|
+// cJL_LEAF2_MAXPOP1 = 51
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 5, 5, 7, 11, 11, 11,
|
||||||
|
+ 15, 15, 15, 15, 23, 23, 23, 23,
|
||||||
|
+ 23, 23, 32, 32, 32, 32, 32, 32,
|
||||||
|
+ 32, 47, 47, 47, 47, 47, 47, 47,
|
||||||
|
+ 47, 47, 47, 47, 47, 64, 64, 64,
|
||||||
|
+ 64, 64, 64, 64, 64, 64, 64, 64,
|
||||||
|
+ 64, 64, 64
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 1, 1, 1, 2, 3, 3, 3,
|
||||||
|
+ 3, 3, 3, 3, 5, 5, 5, 5,
|
||||||
|
+ 5, 5, 7, 7, 7, 7, 7, 7,
|
||||||
|
+ 7, 10, 10, 10, 10, 10, 10, 10,
|
||||||
|
+ 10, 10, 10, 10, 10, 13, 13, 13,
|
||||||
|
+ 13, 13, 13, 13, 13, 13, 13, 13,
|
||||||
|
+ 13, 13, 13
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 64 words
|
||||||
|
+// cJL_LEAF3_MAXPOP1 = 46
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 5, 7, 7, 11, 11, 11,
|
||||||
|
+ 15, 15, 23, 23, 23, 23, 23, 23,
|
||||||
|
+ 32, 32, 32, 32, 32, 32, 32, 47,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 47,
|
||||||
|
+ 47, 47, 64, 64, 64, 64, 64, 64,
|
||||||
|
+ 64, 64, 64, 64, 64, 64
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 1, 2, 2, 2, 3, 3, 3,
|
||||||
|
+ 4, 4, 6, 6, 6, 6, 6, 6,
|
||||||
|
+ 9, 9, 9, 9, 9, 9, 9, 13,
|
||||||
|
+ 13, 13, 13, 13, 13, 13, 13, 13,
|
||||||
|
+ 13, 13, 18, 18, 18, 18, 18, 18,
|
||||||
|
+ 18, 18, 18, 18, 18, 18
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 63 words
|
||||||
|
+// cJL_LEAF4_MAXPOP1 = 42
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf4PopToWords[cJL_LEAF4_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 5, 7, 11, 11, 11, 15,
|
||||||
|
+ 15, 15, 23, 23, 23, 23, 23, 32,
|
||||||
|
+ 32, 32, 32, 32, 32, 47, 47, 47,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||||
|
+ 63, 63, 63, 63, 63, 63, 63, 63,
|
||||||
|
+ 63, 63
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf4Offset[cJL_LEAF4_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 1, 2, 2, 4, 4, 4, 5,
|
||||||
|
+ 5, 5, 8, 8, 8, 8, 8, 11,
|
||||||
|
+ 11, 11, 11, 11, 11, 16, 16, 16,
|
||||||
|
+ 16, 16, 16, 16, 16, 16, 16, 21,
|
||||||
|
+ 21, 21, 21, 21, 21, 21, 21, 21,
|
||||||
|
+ 21, 21
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 64 words
|
||||||
|
+// cJL_LEAF5_MAXPOP1 = 39
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf5PopToWords[cJL_LEAF5_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 5, 7, 11, 11, 15, 15,
|
||||||
|
+ 15, 23, 23, 23, 23, 23, 32, 32,
|
||||||
|
+ 32, 32, 32, 47, 47, 47, 47, 47,
|
||||||
|
+ 47, 47, 47, 47, 64, 64, 64, 64,
|
||||||
|
+ 64, 64, 64, 64, 64, 64, 64
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf5Offset[cJL_LEAF5_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 2, 2, 2, 3, 4, 4, 6, 6,
|
||||||
|
+ 6, 9, 9, 9, 9, 9, 12, 12,
|
||||||
|
+ 12, 12, 12, 18, 18, 18, 18, 18,
|
||||||
|
+ 18, 18, 18, 18, 25, 25, 25, 25,
|
||||||
|
+ 25, 25, 25, 25, 25, 25, 25
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 63 words
|
||||||
|
+// cJL_LEAF6_MAXPOP1 = 36
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf6PopToWords[cJL_LEAF6_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 7, 7, 11, 11, 15, 15,
|
||||||
|
+ 23, 23, 23, 23, 23, 32, 32, 32,
|
||||||
|
+ 32, 32, 47, 47, 47, 47, 47, 47,
|
||||||
|
+ 47, 47, 63, 63, 63, 63, 63, 63,
|
||||||
|
+ 63, 63, 63, 63
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf6Offset[cJL_LEAF6_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 3, 3, 3, 5, 5, 6, 6,
|
||||||
|
+ 10, 10, 10, 10, 10, 14, 14, 14,
|
||||||
|
+ 14, 14, 20, 20, 20, 20, 20, 20,
|
||||||
|
+ 20, 20, 27, 27, 27, 27, 27, 27,
|
||||||
|
+ 27, 27, 27, 27
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 64 words
|
||||||
|
+// cJL_LEAF7_MAXPOP1 = 34
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf7PopToWords[cJL_LEAF7_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 7, 11, 11, 15, 15, 15,
|
||||||
|
+ 23, 23, 23, 23, 32, 32, 32, 32,
|
||||||
|
+ 32, 47, 47, 47, 47, 47, 47, 47,
|
||||||
|
+ 47, 64, 64, 64, 64, 64, 64, 64,
|
||||||
|
+ 64, 64
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf7Offset[cJL_LEAF7_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 3, 3, 5, 5, 7, 7, 7,
|
||||||
|
+ 11, 11, 11, 11, 15, 15, 15, 15,
|
||||||
|
+ 15, 22, 22, 22, 22, 22, 22, 22,
|
||||||
|
+ 22, 30, 30, 30, 30, 30, 30, 30,
|
||||||
|
+ 30, 30
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 63 words
|
||||||
|
+// cJL_LEAFW_MAXPOP1 = 31
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||||
|
+ 23, 23, 23, 32, 32, 32, 32, 47,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||||
|
+ 63, 63, 63, 63, 63, 63, 63
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 2, 3, 4, 6, 6, 8, 8, 12,
|
||||||
|
+ 12, 12, 12, 16, 16, 16, 16, 24,
|
||||||
|
+ 24, 24, 24, 24, 24, 24, 24, 32,
|
||||||
|
+ 32, 32, 32, 32, 32, 32, 32
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 64 words
|
||||||
|
+// cJU_BITSPERSUBEXPL = 64
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 3, 5, 5, 7, 7, 11,
|
||||||
|
+ 11, 11, 11, 15, 15, 15, 15, 23,
|
||||||
|
+ 23, 23, 23, 23, 23, 23, 23, 32,
|
||||||
|
+ 32, 32, 32, 32, 32, 32, 32, 32,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 47,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 64,
|
||||||
|
+ 64, 64, 64, 64, 64, 64, 64, 64,
|
||||||
|
+ 64, 64, 64, 64, 64, 64, 64, 64
|
||||||
|
+};
|
||||||
|
+#else // JU_32BIT
|
||||||
|
+// object uses 64 words
|
||||||
|
+// cJU_BITSPERSUBEXPB = 32
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_BranchBJPPopToWords[cJU_BITSPERSUBEXPB + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||||
|
+ 23, 23, 23, 32, 32, 32, 32, 32,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 64,
|
||||||
|
+ 64, 64, 64, 64, 64, 64, 64, 64
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 32 words
|
||||||
|
+// cJL_LEAF1_MAXPOP1 = 25
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf1PopToWords[cJL_LEAF1_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 5, 5, 7, 11, 11, 11,
|
||||||
|
+ 15, 15, 15, 15, 23, 23, 23, 23,
|
||||||
|
+ 23, 23, 32, 32, 32, 32, 32, 32,
|
||||||
|
+ 32
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf1Offset[cJL_LEAF1_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 1, 1, 1, 2, 3, 3, 3,
|
||||||
|
+ 3, 3, 3, 3, 5, 5, 5, 5,
|
||||||
|
+ 5, 5, 7, 7, 7, 7, 7, 7,
|
||||||
|
+ 7
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 63 words
|
||||||
|
+// cJL_LEAF2_MAXPOP1 = 42
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf2PopToWords[cJL_LEAF2_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 5, 7, 11, 11, 11, 15,
|
||||||
|
+ 15, 15, 23, 23, 23, 23, 23, 32,
|
||||||
|
+ 32, 32, 32, 32, 32, 47, 47, 47,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||||
|
+ 63, 63, 63, 63, 63, 63, 63, 63,
|
||||||
|
+ 63, 63
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf2Offset[cJL_LEAF2_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 1, 2, 2, 4, 4, 4, 5,
|
||||||
|
+ 5, 5, 8, 8, 8, 8, 8, 11,
|
||||||
|
+ 11, 11, 11, 11, 11, 16, 16, 16,
|
||||||
|
+ 16, 16, 16, 16, 16, 16, 16, 21,
|
||||||
|
+ 21, 21, 21, 21, 21, 21, 21, 21,
|
||||||
|
+ 21, 21
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 63 words
|
||||||
|
+// cJL_LEAF3_MAXPOP1 = 36
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf3PopToWords[cJL_LEAF3_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 7, 7, 11, 11, 15, 15,
|
||||||
|
+ 23, 23, 23, 23, 23, 32, 32, 32,
|
||||||
|
+ 32, 32, 47, 47, 47, 47, 47, 47,
|
||||||
|
+ 47, 47, 63, 63, 63, 63, 63, 63,
|
||||||
|
+ 63, 63, 63, 63
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_Leaf3Offset[cJL_LEAF3_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 1, 3, 3, 3, 5, 5, 6, 6,
|
||||||
|
+ 10, 10, 10, 10, 10, 14, 14, 14,
|
||||||
|
+ 14, 14, 20, 20, 20, 20, 20, 20,
|
||||||
|
+ 20, 20, 27, 27, 27, 27, 27, 27,
|
||||||
|
+ 27, 27, 27, 27
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 63 words
|
||||||
|
+// cJL_LEAFW_MAXPOP1 = 31
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_LeafWPopToWords[cJL_LEAFW_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 5, 7, 11, 11, 15, 15, 23,
|
||||||
|
+ 23, 23, 23, 32, 32, 32, 32, 47,
|
||||||
|
+ 47, 47, 47, 47, 47, 47, 47, 63,
|
||||||
|
+ 63, 63, 63, 63, 63, 63, 63
|
||||||
|
+};
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_LeafWOffset[cJL_LEAFW_MAXPOP1 + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 2, 3, 4, 6, 6, 8, 8, 12,
|
||||||
|
+ 12, 12, 12, 16, 16, 16, 16, 24,
|
||||||
|
+ 24, 24, 24, 24, 24, 24, 24, 32,
|
||||||
|
+ 32, 32, 32, 32, 32, 32, 32
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+// object uses 32 words
|
||||||
|
+// cJU_BITSPERSUBEXPL = 32
|
||||||
|
+const uint8_t
|
||||||
|
+j__L_LeafVPopToWords[cJU_BITSPERSUBEXPL + 1] =
|
||||||
|
+{
|
||||||
|
+ 0,
|
||||||
|
+ 3, 3, 3, 5, 5, 7, 7, 11,
|
||||||
|
+ 11, 11, 11, 15, 15, 15, 15, 23,
|
||||||
|
+ 23, 23, 23, 23, 23, 23, 23, 32,
|
||||||
|
+ 32, 32, 32, 32, 32, 32, 32, 32
|
||||||
|
+};
|
||||||
|
+#endif // JU_64BIT
|
3
packages/admin/netdata/root/etc/config/netdata
Normal file
3
packages/admin/netdata/root/etc/config/netdata
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
config netdata 'config'
|
||||||
|
option cloud_claim_token ''
|
||||||
|
option cloud_claim_rooms ''
|
40
packages/admin/nload/Makefile
Normal file
40
packages/admin/nload/Makefile
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
# SPDX-Identifier-License: GPL-2.0-only
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=nload
|
||||||
|
PKG_VERSION:=0.7.4
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/rolandriegel/nload/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=a73b3a75356776860fc4c40daebce04c5022f73d39704a12fb0aeb88a751216a
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Jacky Guo <leickwell@hotmail.com>
|
||||||
|
PKG_LICENSE:=GPL-2.0-only
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
||||||
|
PKG_FIXUP:=autoreconf
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/nload
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=A network traffic monitor
|
||||||
|
DEPENDS:=+libncurses +libstdcpp
|
||||||
|
URL:=https://github.com/rolandriegel/nload
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/nload/description
|
||||||
|
Monitors network traffic and bandwidth usage.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/nload/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/nload $(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,nload))
|
3
packages/admin/nload/test.sh
Normal file
3
packages/admin/nload/test.sh
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
nload -h | grep "$PKG_VERSION"
|
34
packages/admin/nyx/Makefile
Normal file
34
packages/admin/nyx/Makefile
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=nyx
|
||||||
|
PKG_VERSION:=2.1.0
|
||||||
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
|
PYPI_NAME:=nyx
|
||||||
|
PKG_HASH:=88521488d1c9052e457b9e66498a4acfaaa3adf3adc5a199892632f129a5390b
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
|
||||||
|
PKG_LICENSE:=GPL-3.0-only
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
include ../../lang/python/pypi.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include ../../lang/python/python3-package.mk
|
||||||
|
|
||||||
|
define Package/nyx
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
URL:=https://nyx.torproject.org/
|
||||||
|
TITLE:=Terminal status monitor for Tor
|
||||||
|
DEPENDS:=+python3 +python3-stem
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/nyx/description
|
||||||
|
Nyx is a command-line monitor for Tor. With this you can get detailed real-time
|
||||||
|
information about your relay such as bandwidth usage, connections, logs, and
|
||||||
|
much more.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call Py3Package,nyx))
|
||||||
|
$(eval $(call BuildPackage,nyx))
|
||||||
|
$(eval $(call BuildPackage,nyx-src))
|
32
packages/admin/nyx/patches/01-python311.patch
Normal file
32
packages/admin/nyx/patches/01-python311.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From dcaddf2ab7f9d2ef8649f98bb6870995ebe0b893 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Juan Orti Alcaine <jortialc@redhat.com>
|
||||||
|
Date: Mon, 27 Jun 2022 19:38:34 +0200
|
||||||
|
Subject: [PATCH] Replace inspect.getargspec usage to support python 3.11
|
||||||
|
|
||||||
|
---
|
||||||
|
nyx/panel/__init__.py | 2 +-
|
||||||
|
test/__init__.py | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
--- a/nyx/panel/__init__.py
|
||||||
|
+++ b/nyx/panel/__init__.py
|
||||||
|
@@ -78,7 +78,7 @@ class KeyHandler(collections.namedtuple(
|
||||||
|
is_match = self._key_func(key) if self._key_func else key.match(self.key)
|
||||||
|
|
||||||
|
if is_match:
|
||||||
|
- if inspect.getargspec(self._action).args == ['key']:
|
||||||
|
+ if inspect.getfullargspec(self._action).args == ['key']:
|
||||||
|
self._action(key)
|
||||||
|
else:
|
||||||
|
self._action()
|
||||||
|
--- a/test/__init__.py
|
||||||
|
+++ b/test/__init__.py
|
||||||
|
@@ -94,7 +94,7 @@ def render(func, *args, **kwargs):
|
||||||
|
nyx.curses.CURSES_SCREEN.erase()
|
||||||
|
start_time = time.time()
|
||||||
|
|
||||||
|
- func_args = inspect.getargspec(func).args
|
||||||
|
+ func_args = inspect.getfullargspec(func).args
|
||||||
|
|
||||||
|
if func_args[:1] == ['subwindow'] or func_args[:2] == ['self', 'subwindow']:
|
||||||
|
def _draw(subwindow):
|
106
packages/admin/openwisp-config/Makefile
Normal file
106
packages/admin/openwisp-config/Makefile
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
# SPDX-Identifier-License: GPL-3.0-only
|
||||||
|
#
|
||||||
|
# openwisp.org
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=openwisp-config
|
||||||
|
PKG_VERSION:=1.1.0
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Federico Capoano <f.capoano@openwisp.io>
|
||||||
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
|
||||||
|
PKG_SOURCE_URL:=https://github.com/openwisp/openwisp-config.git
|
||||||
|
PKG_MIRROR_HASH:=c78dc17353c642a6f998531f18e20f0651f946d665506a000308e77c02324a79
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_VERSION:=$(PKG_VERSION)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/openwisp-config
|
||||||
|
TITLE:=Remote configuration management agent
|
||||||
|
CATEGORY:=Administration
|
||||||
|
SECTION:=admin
|
||||||
|
SUBMENU:=openwisp
|
||||||
|
DEPENDS:=+curl \
|
||||||
|
+lua \
|
||||||
|
+libuci-lua \
|
||||||
|
+luafilesystem \
|
||||||
|
+luci-lib-nixio \
|
||||||
|
+ca-certificates
|
||||||
|
PKGARCH:=all
|
||||||
|
URL:=https://openwisp.org
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openwisp-config/conffiles
|
||||||
|
/etc/config/openwisp
|
||||||
|
/etc/openwisp/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openwisp-config/install
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/usr/sbin \
|
||||||
|
$(1)/etc/init.d \
|
||||||
|
$(1)/etc/config \
|
||||||
|
$(1)/usr/lib/openwisp-config \
|
||||||
|
$(1)/usr/lib/lua/openwisp
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.agent \
|
||||||
|
$(1)/usr/sbin/openwisp-config
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/openwisp.init \
|
||||||
|
$(1)/etc/init.d/openwisp-config
|
||||||
|
|
||||||
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/openwisp-config/files/openwisp.config \
|
||||||
|
$(1)/etc/config/openwisp
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-reload-config \
|
||||||
|
$(1)/usr/sbin/openwisp-reload-config
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/utils.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp/utils.lua
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/lib/openwisp/net.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp/net.lua
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-store-unmanaged.lua \
|
||||||
|
$(1)/usr/sbin/openwisp-store-unmanaged
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-restore-unmanaged.lua \
|
||||||
|
$(1)/usr/sbin/openwisp-restore-unmanaged
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-remove-default-wifi.lua \
|
||||||
|
$(1)/usr/sbin/openwisp-remove-default-wifi
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-uci-autoname.lua \
|
||||||
|
$(1)/usr/sbin/openwisp-uci-autoname
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-update-config.lua \
|
||||||
|
$(1)/usr/sbin/openwisp-update-config
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-get-address.lua \
|
||||||
|
$(1)/usr/sbin/openwisp-get-address
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-config/files/sbin/openwisp-get-random-number.lua \
|
||||||
|
$(1)/usr/sbin/openwisp-get-random-number
|
||||||
|
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/VERSION $(1)/usr/lib/openwisp-config/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,openwisp-config))
|
9
packages/admin/openwisp-monitoring/Config.in
Normal file
9
packages/admin/openwisp-monitoring/Config.in
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
menu "netjson-monitoring Configuration"
|
||||||
|
|
||||||
|
config NETJSON_MONITORING_IWINFO
|
||||||
|
bool "Enable rpcd-mod-iwinfo"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Whether to include the rpcd-mod-iwinfo dependency (enabled by default).
|
||||||
|
|
||||||
|
endmenu
|
132
packages/admin/openwisp-monitoring/Makefile
Normal file
132
packages/admin/openwisp-monitoring/Makefile
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
# SPDX-Identifier-License: GPL-3.0-only
|
||||||
|
#
|
||||||
|
# openwisp.org
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=openwisp-monitoring
|
||||||
|
PKG_VERSION:=0.2.0
|
||||||
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Federico Capoano <support@openwisp.io>
|
||||||
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
PKG_SOURCE_URL:=https://github.com/openwisp/openwrt-openwisp-monitoring.git
|
||||||
|
PKG_MIRROR_HASH:=6baad2b319cdc072a83547593b447e2c93c42fcdda386f5993c22b88ad991cdd
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_VERSION:=$(PKG_VERSION)
|
||||||
|
PKGARCH:=all
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/openwisp-monitoring
|
||||||
|
TITLE:=OpenWISP Monitoring agent
|
||||||
|
CATEGORY:=Administration
|
||||||
|
SECTION:=admin
|
||||||
|
SUBMENU:=openwisp
|
||||||
|
DEPENDS:=+netjson-monitoring +openwisp-config
|
||||||
|
URL:=http://openwisp.org
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netjson-monitoring
|
||||||
|
TITLE:=NetJSON Monitoring
|
||||||
|
CATEGORY:=Administration
|
||||||
|
SECTION:=admin
|
||||||
|
SUBMENU:=openwisp
|
||||||
|
DEPENDS:=+libubus-lua +lua-cjson +rpcd
|
||||||
|
DEPENDS+=+NETJSON_MONITORING_IWINFO:rpcd-mod-iwinfo
|
||||||
|
URL:=http://openwisp.org
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netjson-monitoring/config
|
||||||
|
source "$(SOURCE)/Config.in"
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openwisp-monitoring/conffiles
|
||||||
|
/etc/config/openwisp-monitoring
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/netjson-monitoring/install
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/usr/sbin \
|
||||||
|
$(1)/usr/libexec \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring \
|
||||||
|
$(1)/usr/lib/openwisp-monitoring
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/sbin/netjson-monitoring.lua \
|
||||||
|
$(1)/usr/libexec/netjson-monitoring
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/netjson-monitoring \
|
||||||
|
$(1)/usr/sbin/netjson-monitoring
|
||||||
|
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/dhcp.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring/dhcp.lua
|
||||||
|
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/interfaces.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring/interfaces.lua
|
||||||
|
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/monitoring.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring/monitoring.lua
|
||||||
|
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/utils.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring/utils.lua
|
||||||
|
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/neighbors.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring/neighbors.lua
|
||||||
|
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/resources.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring/resources.lua
|
||||||
|
|
||||||
|
$(INSTALL_DATA) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/wifi.lua \
|
||||||
|
$(1)/usr/lib/lua/openwisp-monitoring/wifi.lua
|
||||||
|
|
||||||
|
# Iwinfo is enabled by default unless specified otherwise
|
||||||
|
ifeq ($(CONFIG_NETJSON_MONITORING_IWINFO), y)
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/iwinfo.lua $(1)/usr/lib/lua/openwisp-monitoring/iwinfo.lua
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/VERSION $(1)/usr/lib/openwisp-monitoring/
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/openwisp-monitoring/install
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/usr/sbin \
|
||||||
|
$(1)/etc/init.d \
|
||||||
|
$(1)/etc/config \
|
||||||
|
$(1)/usr/lib/openwisp-monitoring \
|
||||||
|
$(1)/etc/hotplug.d/openwisp
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.agent \
|
||||||
|
$(1)/usr/sbin/openwisp-monitoring
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.init \
|
||||||
|
$(1)/etc/init.d/openwisp-monitoring
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/openwisp-monitoring.hotplug \
|
||||||
|
$(1)/etc/hotplug.d/openwisp/openwisp-monitoring
|
||||||
|
|
||||||
|
$(INSTALL_CONF) \
|
||||||
|
$(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.config \
|
||||||
|
$(1)/etc/config/openwisp-monitoring
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,openwisp-monitoring))
|
||||||
|
$(eval $(call BuildPackage,netjson-monitoring))
|
53
packages/admin/qbee-agent/Makefile
Executable file
53
packages/admin/qbee-agent/Makefile
Executable file
@ -0,0 +1,53 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=qbee-agent
|
||||||
|
PKG_VERSION:=2024.36
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO:=git
|
||||||
|
PKG_SOURCE_URL:=https://github.com/qbee-io/qbee-agent.git
|
||||||
|
PKG_SOURCE_VERSION:=d52fb5e69b479550636570a2db6cebe06f5f129b
|
||||||
|
PKG_MIRROR_HASH:=58b4e7b741754bf86d315eb32e43d4a8b80c8b8f5a95cf94b77f48c193385d60
|
||||||
|
|
||||||
|
PKG_LICENSE:=Apache-2.0
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
PKG_MAINTAINER:=Jon Henrik Bjørnstad <jonhenrik@qbee.io>
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:=golang/host
|
||||||
|
PKG_BUILD_FLAGS:=no-mips16
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
GO_PKG:=go.qbee.io/agent
|
||||||
|
GO_PKG_LDFLAGS_X:= \
|
||||||
|
$(GO_PKG)/app.Version=$(PKG_VERSION) \
|
||||||
|
$(GO_PKG)/app.Commit=$(PKG_SOURCE_VERSION)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include ../../lang/golang/golang-package.mk
|
||||||
|
|
||||||
|
define Package/qbee-agent
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=qbee.io fleet management agent
|
||||||
|
URL:=https://qbee.io
|
||||||
|
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/qbee-agent/description
|
||||||
|
qbee.io is a SaaS provided fleet management solution. This package
|
||||||
|
provides the agent that runs on the device and communicates with
|
||||||
|
the qbee.io server.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/qbee-agent/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc/qbee/ppkeys
|
||||||
|
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/share/ssl/ca.cert $(1)/etc/qbee/ppkeys/ca.cert
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/agent $(1)/usr/bin/qbee-agent
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/qbee-agent.init $(1)/etc/init.d/qbee-agent
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,qbee-agent))
|
23
packages/admin/qbee-agent/files/qbee-agent.init
Executable file
23
packages/admin/qbee-agent/files/qbee-agent.init
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=99
|
||||||
|
STOP=11
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
ARGS="start"
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
if [ ! -f /etc/qbee/qbee-agent.json ]; then
|
||||||
|
echo "Device seems to not have been bootstrapped. Please run 'qbee-agent bootstrap -k <bootstrap-key>' as root to bootstrap."
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
procd_open_instance qbee-agent
|
||||||
|
procd_set_param command /usr/bin/qbee-agent $ARGS
|
||||||
|
procd_set_param respawn 3600 60 0
|
||||||
|
procd_set_param stdout 1
|
||||||
|
procd_set_param stderr 1
|
||||||
|
procd_set_param pidfile /var/run/qbee-agent.pid
|
||||||
|
procd_set_param term_timeout 600
|
||||||
|
procd_close_instance
|
||||||
|
}
|
62
packages/admin/rsyslog/Config.in
Normal file
62
packages/admin/rsyslog/Config.in
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
if PACKAGE_rsyslog
|
||||||
|
config RSYSLOG_gssapi_krb5
|
||||||
|
bool "Enable GSSAPI Kerberos 5 support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable GSSAPI Kerberos 5 support in rsyslog
|
||||||
|
config RSYSLOG_mysql
|
||||||
|
bool "Enable MySQL support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable MySQL support in rsyslog
|
||||||
|
config RSYSLOG_pgsql
|
||||||
|
bool "Enable PostgreSQL support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable PostgreSQL support in rsyslog
|
||||||
|
config RSYSLOG_libdbi
|
||||||
|
bool "Enable libdbi support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable libdbi support in rsyslog
|
||||||
|
config RSYSLOG_elasticsearch
|
||||||
|
bool "Enable ElasticSearch module support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable ElasticSearch output module in rsyslog
|
||||||
|
config RSYSLOG_omhttp
|
||||||
|
bool "Enable HTTP output module support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable HTTP output module in rsyslog
|
||||||
|
config RSYSLOG_openssl
|
||||||
|
bool "Enable OpenSSL support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable OpenSSL support in rsyslog
|
||||||
|
config RSYSLOG_gnutls
|
||||||
|
bool "Enable GnuTLS support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable GnuTLS support in rsyslog
|
||||||
|
config RSYSLOG_mail
|
||||||
|
bool "Enable Mail support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable mail support in rsyslog
|
||||||
|
config RSYSLOG_mmjsonparse
|
||||||
|
bool "Enable JSON parsing module support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable JSON parsing support in rsyslog
|
||||||
|
config RSYSLOG_mmdblookup
|
||||||
|
bool "Enable MaxMind DB lookup helper support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable MaxMind DB lookup helper support in rsyslog
|
||||||
|
config RSYSLOG_imfile
|
||||||
|
bool "Enable file input module support"
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
Enable input file module in rsyslog
|
||||||
|
endif
|
83
packages/admin/rsyslog/Makefile
Normal file
83
packages/admin/rsyslog/Makefile
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2006-2014 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=rsyslog
|
||||||
|
PKG_VERSION:=8.2408.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:= \
|
||||||
|
https://fossies.org/linux/misc \
|
||||||
|
https://www.rsyslog.com/files/download/rsyslog
|
||||||
|
PKG_HASH:=8bb2f15f9bf9bb7e635182e3d3e370bfc39d08bf35a367dce9714e186f787206
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=
|
||||||
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:rsyslog:rsyslog
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/rsyslog
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Enhanced system logging and kernel message trapping daemons
|
||||||
|
URL:=https://www.rsyslog.com/
|
||||||
|
DEPENDS:= \
|
||||||
|
+RSYSLOG_gssapi_krb5:krb5-libs +RSYSLOG_elasticsearch:libcurl \
|
||||||
|
+RSYSLOG_libdbi:libdbi +libestr +libfastjson +RSYSLOG_gnutls:libgnutls \
|
||||||
|
+RSYSLOG_mmdblookup:libmaxminddb +RSYSLOG_mysql:libmysqlclient \
|
||||||
|
+RSYSLOG_omhttp:libcurl +RSYSLOG_openssl:libopenssl \
|
||||||
|
+RSYSLOG_pgsql:libpq +libuuid +zlib
|
||||||
|
MENU:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/rsyslog/conffiles
|
||||||
|
/etc/rsyslog.conf
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS+= \
|
||||||
|
--disable-libgcrypt \
|
||||||
|
--disable-fmhttp \
|
||||||
|
--disable-default-tests \
|
||||||
|
--disable-libsystemd \
|
||||||
|
$(if $(CONFIG_RSYSLOG_gssapi_krb5),--enable-gssapi-krb5) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_mysql),--enable-mysql) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_pgsql),--enable-pgsql) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_libdbi),--enable-libdbi) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_elasticsearch),--enable-elasticsearch) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_omhttp),--enable-omhttp) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_openssl),--enable-openssl) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_gnutls),--enable-gnutls) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_mail),--enable-mail) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_mmjsonparse),--enable-mmjsonparse) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_mmdblookup),--enable-mmdblookup) \
|
||||||
|
$(if $(CONFIG_RSYSLOG_imfile),--enable-imfile)
|
||||||
|
|
||||||
|
define Package/rsyslog/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/sbin
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/rsyslogd $(1)/usr/sbin/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/rsyslog
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/rsyslog/* $(1)/usr/lib/rsyslog/
|
||||||
|
$(INSTALL_DIR) $(1)/etc
|
||||||
|
$(INSTALL_CONF) ./files/rsyslog.conf $(1)/etc
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/rsyslog.init $(1)/etc/init.d/rsyslog
|
||||||
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||||
|
$(INSTALL_CONF) ./files/20_rsyslog $(1)/etc/uci-defaults
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/rsyslog/config
|
||||||
|
source "$(SOURCE)/Config.in"
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,rsyslog))
|
35
packages/admin/rsyslog/files/20_rsyslog
Normal file
35
packages/admin/rsyslog/files/20_rsyslog
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
grep -qv -e '^\s*#' -e '^\s*$' /etc/rsyslog.conf 2>/dev/null && exit 0
|
||||||
|
[ "$(uci -q get rsyslog.syslog)" == "syslog" ] && exit 0
|
||||||
|
|
||||||
|
uci -q import rsyslog << EOI
|
||||||
|
config syslog 'syslog'
|
||||||
|
option tcp_input_port '514'
|
||||||
|
option udp_input '1'
|
||||||
|
option tcp_input '0'
|
||||||
|
option udp_input_port '514'
|
||||||
|
option default_template 'RSYSLOG_TraditionalFileFormat'
|
||||||
|
list modules 'imuxsock'
|
||||||
|
list modules 'imklog'
|
||||||
|
|
||||||
|
config selector
|
||||||
|
option source '*.info;mail.none;authpriv.none;cron.none'
|
||||||
|
option destination '/var/log/messages'
|
||||||
|
|
||||||
|
config selector
|
||||||
|
option source 'authpriv.*'
|
||||||
|
option destination '/var/log/secure'
|
||||||
|
|
||||||
|
config selector
|
||||||
|
option source 'mail.*'
|
||||||
|
option destination '/var/log/maillog'
|
||||||
|
|
||||||
|
config selector
|
||||||
|
option source 'cron.*'
|
||||||
|
option destination '/var/log/cron'
|
||||||
|
|
||||||
|
config selector
|
||||||
|
option source 'local7.*'
|
||||||
|
option destination '/var/log/boot.log'
|
||||||
|
EOI
|
18
packages/admin/rsyslog/files/rsyslog.conf
Normal file
18
packages/admin/rsyslog/files/rsyslog.conf
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#
|
||||||
|
# The preferred way to configure rsyslogd is now UCI.
|
||||||
|
#
|
||||||
|
# This file can be still used and will be included
|
||||||
|
# on top of the final configuration inside /var/etc/rsyslog.conf
|
||||||
|
#
|
||||||
|
# Example of default configuration:
|
||||||
|
#
|
||||||
|
# module(load="imuxsock")
|
||||||
|
# module(load="imklog")
|
||||||
|
# module(load="imudp")
|
||||||
|
# input(type="imudp" port="514")
|
||||||
|
# $ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||||
|
# *.info;mail.none;authpriv.none;cron.none /var/log/messages
|
||||||
|
# authpriv.* /var/log/secure
|
||||||
|
# mail.* /var/log/maillog
|
||||||
|
# cron.* /var/log/cron
|
||||||
|
# local7.* /var/log/boot.log
|
114
packages/admin/rsyslog/files/rsyslog.init
Normal file
114
packages/admin/rsyslog/files/rsyslog.init
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2014 OpenWrt.org
|
||||||
|
|
||||||
|
# shellcheck disable=SC3043
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
# shellcheck disable=SC3037
|
||||||
|
# shellcheck disable=SC2154
|
||||||
|
# shellcheck disable=SC2129
|
||||||
|
|
||||||
|
START=20
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
UCI_CONF="rsyslog"
|
||||||
|
CONFIG_FILE="/var/etc/rsyslog.conf"
|
||||||
|
BASE_CONFIG_FILE="/etc/rsyslog.conf"
|
||||||
|
|
||||||
|
modules=""
|
||||||
|
selectors=""
|
||||||
|
forwarders=""
|
||||||
|
|
||||||
|
handle_selector() {
|
||||||
|
local config="$1"
|
||||||
|
local src
|
||||||
|
local dst
|
||||||
|
|
||||||
|
config_get src "${config}" source
|
||||||
|
config_get dst "${config}" destination
|
||||||
|
if [ "${src}" != "" ] && [ "$dst" != "" ]; then
|
||||||
|
selectors="${selectors}\n${src}\t${dst}\n"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_forwarder() {
|
||||||
|
local config="$1"
|
||||||
|
local src
|
||||||
|
local target
|
||||||
|
local protocol
|
||||||
|
local port
|
||||||
|
local rfc
|
||||||
|
local opts
|
||||||
|
|
||||||
|
config_get src "${config}" source
|
||||||
|
config_get target "${config}" target
|
||||||
|
config_get protocol "${config}" protocol "udp"
|
||||||
|
config_get port "${config}" port "514"
|
||||||
|
config_get rfc "${config}" rfc "3164"
|
||||||
|
|
||||||
|
if [ "$rfc" = "5424" ]; then
|
||||||
|
opts='Template="RSYSLOG_SyslogProtocol23Format" TCP_Framing="octet-counted"'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${src}" != "" ] && [ "${target}" != "" ]; then
|
||||||
|
action="action(type=\"omfwd\" target=\"$target\" port=\"$port\" protocol=\"$protocol\" $opts action.resumeRetryCount=\"100\" queue.type=\"linkedList\" queue.size=\"10000\")"
|
||||||
|
forwarders="${forwarders}\n${src}\t${action}\n"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
expand_config() {
|
||||||
|
local input_t=""
|
||||||
|
local input_u=""
|
||||||
|
|
||||||
|
config_load "${UCI_CONF}"
|
||||||
|
config_list_foreach syslog modules handle_module
|
||||||
|
config_get_bool tcp_input syslog tcp_input
|
||||||
|
if [ "${tcp_input}" -eq 1 ]; then
|
||||||
|
modules="${modules} imtcp"
|
||||||
|
config_get tcp_port syslog tcp_input_port
|
||||||
|
input_t="input(type=\"imtcp\" port=\"${tcp_port}\")"
|
||||||
|
fi
|
||||||
|
|
||||||
|
config_get_bool udp_input syslog udp_input
|
||||||
|
if [ "${udp_input}" -eq 1 ]; then
|
||||||
|
modules="${modules} imudp"
|
||||||
|
config_get udp_port syslog udp_input_port
|
||||||
|
input_u="input(type=\"imudp\" port=\"${udp_port}\")"
|
||||||
|
|
||||||
|
fi
|
||||||
|
config_get template syslog default_template
|
||||||
|
config_foreach handle_selector selector
|
||||||
|
config_foreach handle_forwarder forwarder
|
||||||
|
|
||||||
|
mkdir -p "$(dirname ${CONFIG_FILE})"
|
||||||
|
# shellcheck disable=SC2188
|
||||||
|
> ${CONFIG_FILE}
|
||||||
|
echo "include(file=\"${BASE_CONFIG_FILE}\" mode=\"optional\")" >> ${CONFIG_FILE}
|
||||||
|
for m in ${modules}; do
|
||||||
|
echo "module(load=\"${m}\")" >> ${CONFIG_FILE}
|
||||||
|
done
|
||||||
|
echo "${input_t}" >> ${CONFIG_FILE}
|
||||||
|
echo "${input_u}" >> ${CONFIG_FILE}
|
||||||
|
echo "\$ActionFileDefaultTemplate ${template}" >> ${CONFIG_FILE}
|
||||||
|
echo -e "${selectors}" >> ${CONFIG_FILE}
|
||||||
|
echo -e "${forwarders}" >> ${CONFIG_FILE}
|
||||||
|
}
|
||||||
|
|
||||||
|
handle_module() {
|
||||||
|
local module="$1"
|
||||||
|
modules="${modules} $module"
|
||||||
|
}
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
expand_config
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command /usr/sbin/rsyslogd -f ${CONFIG_FILE} -n
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
service_triggers()
|
||||||
|
{
|
||||||
|
procd_add_reload_trigger ${UCI_CONF}
|
||||||
|
}
|
23
packages/admin/schroot/Config.in
Normal file
23
packages/admin/schroot/Config.in
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
menu "Configuration"
|
||||||
|
|
||||||
|
config SCHROOT_BTRFS
|
||||||
|
bool "Enable support for btrfs snapshots"
|
||||||
|
select PACKAGE_btrfs-progs
|
||||||
|
default n
|
||||||
|
|
||||||
|
config SCHROOT_LOOPBACK
|
||||||
|
bool "Enable support for loopback mounts"
|
||||||
|
select PACKAGE_losetup
|
||||||
|
default n
|
||||||
|
|
||||||
|
config SCHROOT_LVM
|
||||||
|
bool "Enable support for LVM snapshots"
|
||||||
|
select PACKAGE_lvm2
|
||||||
|
default n
|
||||||
|
|
||||||
|
config SCHROOT_UUID
|
||||||
|
bool "Enable support for UUIDs"
|
||||||
|
select PACKAGE_libuuid
|
||||||
|
default n
|
||||||
|
|
||||||
|
endmenu
|
87
packages/admin/schroot/Makefile
Normal file
87
packages/admin/schroot/Makefile
Normal file
@ -0,0 +1,87 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=reschroot
|
||||||
|
PKG_VERSION:=1.6.13
|
||||||
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeberg.org/shelter/reschroot/archive/release
|
||||||
|
PKG_HASH:=c05d6a1bb0210d401e6522eee2c465e0b43c6c98f7101d671f9e9ef88b3accf5
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
|
||||||
|
PKG_LICENSE:=GPL-3.0-only
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
|
||||||
|
CMAKE_INSTALL:=1
|
||||||
|
|
||||||
|
CMAKE_BINARY_SUBDIR:=build
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)/$(PKG_NAME)
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
|
||||||
|
define Package/schroot
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Securely enter a chroot and run a command or login shell.
|
||||||
|
DEPENDS:=$(ICONV_DEPENDS) \
|
||||||
|
+boost +boost-filesystem +boost-iostreams +boost-program_options +boost-regex \
|
||||||
|
+SCHROOT_BTRFS:btrfs-progs \
|
||||||
|
+SCHROOT_LOOPBACK:losetup \
|
||||||
|
+SCHROOT_LVM:lvm2 \
|
||||||
|
+SCHROOT_UUID:libuuid \
|
||||||
|
$(INTL_DEPENDS)
|
||||||
|
URL:=https://codeberg.org/shelter/reschroot
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/schroot/description
|
||||||
|
Securely enter a chroot and run a command or login shell.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/schroot/conffiles
|
||||||
|
/etc/schroot/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/schroot/config
|
||||||
|
source "$(SOURCE)/Config.in"
|
||||||
|
endef
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS := \
|
||||||
|
CONFIG_SCHROOT_BTRFS \
|
||||||
|
CONFIG_SCHROOT_LOOPBACK \
|
||||||
|
CONFIG_SCHROOT_LVM \
|
||||||
|
CONFIG_SCHROOT_UUID
|
||||||
|
|
||||||
|
CMAKE_OPTIONS += \
|
||||||
|
-Dbtrfs-snapshot=$(if $(CONFIG_SCHROOT_BTRFS),ON,OFF) \
|
||||||
|
-Dloopback=$(if $(CONFIG_SCHROOT_LOOPBACK),ON,OFF) \
|
||||||
|
-Dlvm-snapshot=$(if $(CONFIG_SCHROOT_LVM),ON,OFF) \
|
||||||
|
-Duuid=$(if $(CONFIG_SCHROOT_UUID),ON,OFF) \
|
||||||
|
-Dblock-device=ON \
|
||||||
|
-Dunion=ON \
|
||||||
|
-Ddhcroot=OFF \
|
||||||
|
-Ddchroot-dsa=OFF \
|
||||||
|
-Ddebug=OFF \
|
||||||
|
-Ddoxygen=OFF \
|
||||||
|
-Dpam=OFF \
|
||||||
|
-Dtest=OFF \
|
||||||
|
-Duuid=OFF \
|
||||||
|
-Dzfs-snapshot=OFF
|
||||||
|
|
||||||
|
define Package/schroot/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/bin/schroot $(1)/usr/bin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/schroot
|
||||||
|
$(CP) -R $(PKG_INSTALL_DIR)/etc/schroot/* $(1)/etc/schroot
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/schroot
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/libsbuild.* $(1)/usr/lib/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/libexec/schroot
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/schroot/schroot-* $(1)/usr/libexec/schroot/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/schroot
|
||||||
|
$(CP) -R $(PKG_INSTALL_DIR)/usr/share/schroot/* $(1)/usr/share/schroot/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/schroot.init $(1)/etc/init.d/schroot
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,schroot))
|
10
packages/admin/schroot/files/schroot.init
Executable file
10
packages/admin/schroot/files/schroot.init
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
|
||||||
|
START=94
|
||||||
|
|
||||||
|
start() {
|
||||||
|
[ -d /var/lib/schroot ] || {
|
||||||
|
mkdir -p /var/lib/schroot/session /var/lib/schroot/unpack /var/lib/schroot/union/overlay /var/lib/schroot/union/underlay
|
||||||
|
chmod 0700 /var/lib/schroot
|
||||||
|
}
|
||||||
|
}
|
169
packages/admin/schroot/patches/01-openwrt.patch
Normal file
169
packages/admin/schroot/patches/01-openwrt.patch
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -210,8 +210,8 @@ endif(BUILD_PAM)
|
||||||
|
set(BLOCKDEV_DEFAULT ON)
|
||||||
|
|
||||||
|
# LVM snapshot mount feature
|
||||||
|
-find_program(LVCREATE_EXECUTABLE lvcreate PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
-find_program(LVREMOVE_EXECUTABLE lvremove PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
+#find_program(LVCREATE_EXECUTABLE lvcreate PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
+#find_program(LVREMOVE_EXECUTABLE lvremove PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
set(LVMSNAP_DEFAULT OFF)
|
||||||
|
if (LVCREATE_EXECUTABLE AND LVREMOVE_EXECUTABLE)
|
||||||
|
set (LVMSNAP_DEFAULT ON)
|
||||||
|
@@ -224,7 +224,7 @@ if (lvm-snapshot)
|
||||||
|
endif(lvm-snapshot)
|
||||||
|
|
||||||
|
# ZFS snapshot mount feature
|
||||||
|
-find_program(ZFS_EXECUTABLE zfs PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
+#find_program(ZFS_EXECUTABLE zfs PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
set(ZFSSNAP_DEFAULT OFF)
|
||||||
|
if (ZFS_EXECUTABLE)
|
||||||
|
set (ZFSSNAP_DEFAULT ON)
|
||||||
|
@@ -237,7 +237,7 @@ if (zfs-snapshot)
|
||||||
|
endif(zfs-snapshot)
|
||||||
|
|
||||||
|
# Btrfs snapshot mount feature
|
||||||
|
-find_program(BTRFS_EXECUTABLE btrfs PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
+#find_program(BTRFS_EXECUTABLE btrfs PATHS /sbin /usr/sbin /usr/local/sbin)
|
||||||
|
set(BTRFSSNAP_DEFAULT OFF)
|
||||||
|
if (BTRFS_EXECUTABLE)
|
||||||
|
set (BTRFSSNAP_DEFAULT ON)
|
||||||
|
@@ -310,15 +310,9 @@ include_directories(${PROJECT_BINARY_DIR
|
||||||
|
${PROJECT_BINARY_DIR}
|
||||||
|
${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
|
-enable_testing()
|
||||||
|
-
|
||||||
|
add_subdirectory(sbuild)
|
||||||
|
add_subdirectory(bin)
|
||||||
|
-add_subdirectory(test)
|
||||||
|
-add_subdirectory(doc)
|
||||||
|
add_subdirectory(etc)
|
||||||
|
-add_subdirectory(po)
|
||||||
|
-add_subdirectory(man)
|
||||||
|
|
||||||
|
add_custom_target(check-news
|
||||||
|
COMMAND if grep -q "Welcome to ${CMAKE_PROJECT_NAME} ${GIT_RELEASE_VERSION}" "${PROJECT_SOURCE_DIR}/NEWS" \; then echo "NEWS current version ${GIT_RELEASE_VERSION}" \; else echo "NEWS current version does not match release version ${GIT_RELEASE_VERSION}" \; exit 1 \; fi
|
||||||
|
--- a/bin/schroot-base/schroot-base-run.h
|
||||||
|
+++ b/bin/schroot-base/schroot-base-run.h
|
||||||
|
@@ -61,8 +61,8 @@ namespace schroot_base
|
||||||
|
std::cout.imbue(std::locale());
|
||||||
|
std::cerr.imbue(std::locale());
|
||||||
|
|
||||||
|
- bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR);
|
||||||
|
- textdomain (SBUILD_MESSAGE_CATALOGUE);
|
||||||
|
+ //bindtextdomain (SBUILD_MESSAGE_CATALOGUE, SCHROOT_LOCALE_DIR);
|
||||||
|
+ //textdomain (SBUILD_MESSAGE_CATALOGUE);
|
||||||
|
|
||||||
|
typename options_type::ptr opts(new options_type);
|
||||||
|
main_type kit(opts);
|
||||||
|
--- a/sbuild/sbuild-feature.h
|
||||||
|
+++ b/sbuild/sbuild-feature.h
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include <boost/format.hpp>
|
||||||
|
+#include <libintl.h>
|
||||||
|
|
||||||
|
namespace sbuild
|
||||||
|
{
|
||||||
|
--- a/etc/setup.d/20copyfiles
|
||||||
|
+++ b/etc/setup.d/20copyfiles
|
||||||
|
@@ -39,9 +39,9 @@ copy_file()
|
||||||
|
if [ -e "$2" ]; then
|
||||||
|
|
||||||
|
# Device and inode
|
||||||
|
- da=$(/usr/bin/stat --format="%d %i" "$1")
|
||||||
|
+ da=$(/bin/stat --format="%d %i" "$1")
|
||||||
|
# This one can fail since it might not exist yet
|
||||||
|
- db=$(/usr/bin/stat --format="%d %i" "$2" 2>/dev/null || :)
|
||||||
|
+ db=$(/bin/stat --format="%d %i" "$2" 2>/dev/null || :)
|
||||||
|
|
||||||
|
if [ "$da" = "$db" ]; then
|
||||||
|
COPY="false"
|
||||||
|
--- a/etc/setup.d/20nssdatabases
|
||||||
|
+++ b/etc/setup.d/20nssdatabases
|
||||||
|
@@ -29,7 +29,7 @@ set -e
|
||||||
|
dup_nss()
|
||||||
|
{
|
||||||
|
info "Copying $1 database to $2"
|
||||||
|
- getent "$1" > "$2"
|
||||||
|
+ cat "/etc/$1" > "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $STAGE = "setup-start" ] || [ $STAGE = "setup-recover" ]; then
|
||||||
|
@@ -42,9 +42,9 @@ if [ $STAGE = "setup-start" ] || [ $STAG
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Device and inode
|
||||||
|
- dr=$(/usr/bin/stat --format="%d %i" "/etc/$db")
|
||||||
|
+ dr=$(/bin/stat --format="%d %i" "/etc/$db")
|
||||||
|
# This one can fail since it might not exist yet
|
||||||
|
- dc=$(/usr/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :)
|
||||||
|
+ dc=$(/bin/stat --format="%d %i" "${CHROOT_PATH}/etc/$db" 2>/dev/null || :)
|
||||||
|
|
||||||
|
# If the database inside and outside the chroot is the
|
||||||
|
# same, it's very likely that dup_nss would blank the
|
||||||
|
--- a/etc/profile-templates/all/all/nssdatabases
|
||||||
|
+++ b/etc/profile-templates/all/all/nssdatabases
|
||||||
|
@@ -3,5 +3,5 @@
|
||||||
|
# <database name>
|
||||||
|
passwd
|
||||||
|
shadow
|
||||||
|
-group
|
||||||
|
-gshadow
|
||||||
|
+#group
|
||||||
|
+#gshadow
|
||||||
|
--- a/etc/profile-templates/buildd/all/nssdatabases
|
||||||
|
+++ b/etc/profile-templates/buildd/all/nssdatabases
|
||||||
|
@@ -3,5 +3,5 @@
|
||||||
|
# <database name>
|
||||||
|
passwd
|
||||||
|
shadow
|
||||||
|
-group
|
||||||
|
-gshadow
|
||||||
|
+#group
|
||||||
|
+#gshadow
|
||||||
|
--- a/etc/profile-templates/default/all/nssdatabases
|
||||||
|
+++ b/etc/profile-templates/default/all/nssdatabases
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
services
|
||||||
|
protocols
|
||||||
|
-networks
|
||||||
|
+#networks
|
||||||
|
hosts
|
||||||
|
--- a/etc/profile-templates/desktop/all/nssdatabases
|
||||||
|
+++ b/etc/profile-templates/desktop/all/nssdatabases
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
services
|
||||||
|
protocols
|
||||||
|
-networks
|
||||||
|
+#networks
|
||||||
|
hosts
|
||||||
|
--- a/etc/profile-templates/default/linux/fstab
|
||||||
|
+++ b/etc/profile-templates/default/linux/fstab
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
# to run additional services in the chroot. However, note that this
|
||||||
|
# may potentially cause undesirable behaviour on upgrades, such as
|
||||||
|
# killing services on the host.
|
||||||
|
-#/run /run none rw,bind 0 0
|
||||||
|
+/run /run none rw,bind 0 0
|
||||||
|
#/run/lock /run/lock none rw,bind 0 0
|
||||||
|
-#/dev/shm /dev/shm none rw,bind 0 0
|
||||||
|
-#/run/shm /run/shm none rw,bind 0 0
|
||||||
|
+/tmp/shm /dev/shm none rw,bind 0 0
|
||||||
|
+/tmp/shm /run/shm none rw,bind 0 0
|
||||||
|
--- a/etc/profile-templates/desktop/linux/fstab
|
||||||
|
+++ b/etc/profile-templates/desktop/linux/fstab
|
||||||
|
@@ -12,7 +12,7 @@
|
||||||
|
# to run additional services in the chroot. However, note that this
|
||||||
|
# may potentially cause undesirable behaviour on upgrades, such as
|
||||||
|
# killing services on the host.
|
||||||
|
-#/run /run none rw,bind 0 0
|
||||||
|
+/run /run none rw,bind 0 0
|
||||||
|
#/run/lock /run/lock none rw,bind 0 0
|
||||||
|
-#/dev/shm /dev/shm none rw,bind 0 0
|
||||||
|
-#/run/shm /run/shm none rw,bind 0 0
|
||||||
|
+/tmp/shm /dev/shm none rw,bind 0 0
|
||||||
|
+/tmp/shm /run/shm none rw,bind 0 0
|
32
packages/admin/schroot/patches/020-gcc14.patch
Normal file
32
packages/admin/schroot/patches/020-gcc14.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -310,6 +310,8 @@ include_directories(${PROJECT_BINARY_DIR
|
||||||
|
${PROJECT_BINARY_DIR}
|
||||||
|
${PROJECT_SOURCE_DIR})
|
||||||
|
|
||||||
|
+find_package(Intl)
|
||||||
|
+
|
||||||
|
add_subdirectory(sbuild)
|
||||||
|
add_subdirectory(bin)
|
||||||
|
add_subdirectory(etc)
|
||||||
|
--- a/sbuild/CMakeLists.txt
|
||||||
|
+++ b/sbuild/CMakeLists.txt
|
||||||
|
@@ -208,6 +208,7 @@ add_library(sbuild STATIC
|
||||||
|
${public_chroot_facet_cc_sources})
|
||||||
|
target_link_libraries(sbuild
|
||||||
|
PRIVATE
|
||||||
|
+ Intl::Intl
|
||||||
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
|
${PAM_LIBRARY}
|
||||||
|
${UUID_LIBRARY}
|
||||||
|
--- a/sbuild/sbuild-basic-keyfile.tcc
|
||||||
|
+++ b/sbuild/sbuild-basic-keyfile.tcc
|
||||||
|
@@ -214,7 +214,7 @@ sbuild::basic_keyfile<K, P>::get_locale_
|
||||||
|
}
|
||||||
|
catch (std::runtime_error const& e) // Invalid locale
|
||||||
|
{
|
||||||
|
- localename = std::locale::classic();
|
||||||
|
+ localename = std::locale::classic().name();
|
||||||
|
}
|
||||||
|
std::string::size_type pos;
|
||||||
|
bool status = false;
|
31
packages/admin/schroot/patches/030-boost-1.85.patch
Normal file
31
packages/admin/schroot/patches/030-boost-1.85.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
--- a/sbuild/sbuild-chroot-config.cc
|
||||||
|
+++ b/sbuild/sbuild-chroot-config.cc
|
||||||
|
@@ -31,6 +31,7 @@
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
|
+#include <boost/filesystem/directory.hpp>
|
||||||
|
#include <boost/filesystem/operations.hpp>
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
--- a/sbuild/sbuild-run-parts.cc
|
||||||
|
+++ b/sbuild/sbuild-run-parts.cc
|
||||||
|
@@ -29,6 +29,7 @@
|
||||||
|
#include <syslog.h>
|
||||||
|
|
||||||
|
#include <boost/format.hpp>
|
||||||
|
+#include <boost/filesystem/directory.hpp>
|
||||||
|
#include <boost/filesystem/operations.hpp>
|
||||||
|
|
||||||
|
using boost::format;
|
||||||
|
--- a/sbuild/sbuild-util.cc
|
||||||
|
+++ b/sbuild/sbuild-util.cc
|
||||||
|
@@ -35,8 +35,6 @@
|
||||||
|
#include <time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#include <boost/filesystem/convenience.hpp>
|
||||||
|
-
|
||||||
|
using namespace sbuild;
|
||||||
|
|
||||||
|
namespace
|
89
packages/admin/sudo/Makefile
Normal file
89
packages/admin/sudo/Makefile
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2006-2017 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=sudo
|
||||||
|
PKG_REALVERSION:=1.9.15p5
|
||||||
|
PKG_VERSION:=$(subst p,_p,$(PKG_REALVERSION))
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_REALVERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://www.sudo.ws/dist
|
||||||
|
PKG_HASH:=558d10b9a1991fb3b9fa7fa7b07ec4405b7aefb5b3cb0b0871dbc81e3a88e558
|
||||||
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_REALVERSION)
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
|
||||||
|
|
||||||
|
PKG_LICENSE:=ISC
|
||||||
|
PKG_LICENSE_FILES:=doc/LICENSE
|
||||||
|
PKG_CPE_ID:=cpe:/a:sudo_project:sudo
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_BUILD_FLAGS:=no-mips16
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/sudo
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=Delegate authority to run commands
|
||||||
|
URL:=https://www.sudo.ws/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/sudo/description
|
||||||
|
Sudo (su "do") allows a system administrator to delegate authority to
|
||||||
|
give certain users (or groups of users) the ability to run some (or
|
||||||
|
all) commands as root or another user while providing an audit trail of
|
||||||
|
the commands and their arguments.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/sudo/conffiles
|
||||||
|
/etc/sudoers
|
||||||
|
/etc/sudoers.d/
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--without-pam \
|
||||||
|
--disable-pam-session \
|
||||||
|
--with-editor=/bin/vi \
|
||||||
|
--without-lecture \
|
||||||
|
--disable-zlib \
|
||||||
|
--disable-openssl \
|
||||||
|
--with-rundir=/var/lib/sudo \
|
||||||
|
--with-vardir=/var/lib/sudo
|
||||||
|
|
||||||
|
CONFIGURE_VARS += \
|
||||||
|
sudo_cv_uid_t_len=10 \
|
||||||
|
sudo_cv_func_unsetenv_void=no
|
||||||
|
|
||||||
|
define Package/sudo/install
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/etc/{init.d,sudoers.d} \
|
||||||
|
$(1)/usr/{bin,sbin} \
|
||||||
|
$(1)/usr/lib/sudo
|
||||||
|
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/bin/sudo $(1)/usr/bin/
|
||||||
|
chmod 4755 $(1)/usr/bin/sudo
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/sbin/visudo $(1)/usr/sbin/
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/etc/sudoers $(1)/etc/
|
||||||
|
chmod 0440 $(1)/etc/sudoers
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/sudo/*.so* $(1)/usr/lib/sudo/
|
||||||
|
$(INSTALL_BIN) ./files/sudo.init $(1)/etc/init.d/sudo
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/sudo/postinst
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -n "$$IPKG_INSTROOT" ] || {
|
||||||
|
/etc/init.d/sudo enable
|
||||||
|
/etc/init.d/sudo start
|
||||||
|
}
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,sudo))
|
11
packages/admin/sudo/files/sudo.init
Executable file
11
packages/admin/sudo/files/sudo.init
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2014 OpenWrt.org
|
||||||
|
|
||||||
|
START=99
|
||||||
|
|
||||||
|
start() {
|
||||||
|
[ -d /var/lib/sudo ] || {
|
||||||
|
mkdir -m 0755 -p /var/lib/sudo
|
||||||
|
chmod 0700 /var/lib/sudo
|
||||||
|
}
|
||||||
|
}
|
11
packages/admin/sudo/patches/020-no-owner-change.patch
Normal file
11
packages/admin/sudo/patches/020-no-owner-change.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/Makefile.in
|
||||||
|
+++ b/Makefile.in
|
||||||
|
@@ -75,7 +75,7 @@ EGREP = @EGREP@
|
||||||
|
SED = @SED@
|
||||||
|
|
||||||
|
INSTALL = $(SHELL) $(scriptdir)/install-sh -c
|
||||||
|
-INSTALL_OWNER = -o $(install_uid) -g $(install_gid)
|
||||||
|
+INSTALL_OWNER =
|
||||||
|
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_C = @ECHO_C@
|
7
packages/admin/sudo/test.sh
Normal file
7
packages/admin/sudo/test.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
sudo)
|
||||||
|
sudo --version | grep "${2//_p/p}"
|
||||||
|
;;
|
||||||
|
esac
|
159
packages/admin/syslog-ng/Makefile
Normal file
159
packages/admin/syslog-ng/Makefile
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=syslog-ng
|
||||||
|
PKG_VERSION:=4.7.1
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
|
||||||
|
PKG_LICENSE:=LGPL-2.1-or-later GPL-2.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING LGPL.txt GPL.txt
|
||||||
|
PKG_CPE_ID:=cpe:/a:balabit:syslog-ng
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://github.com/syslog-ng/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
|
||||||
|
PKG_HASH:=5477189a2d12325aa4faebfcf59f5bdd9084234732f0c3ec16dd253847dacf1c
|
||||||
|
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
PKG_BUILD_DEPENDS:= \
|
||||||
|
HOST_OS_MACOS:fakeuname/host \
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
CONFIG_IPV6 \
|
||||||
|
CONFIG_LIBCURL_ZLIB
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
ifeq ($(CONFIG_HOST_OS_MACOS),y)
|
||||||
|
include ../../utils/fakeuname/fakeuname.mk
|
||||||
|
endif
|
||||||
|
|
||||||
|
define Package/syslog-ng
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
TITLE:=A powerful syslog daemon
|
||||||
|
URL:=https://www.syslog-ng.com/products/open-source-log-management/
|
||||||
|
DEPENDS:=+libpcre2 +glib2 +libopenssl +libpthread +librt +libdbi +libjson-c +libcurl +libuuid +SYSLOGNG_LOGROTATE:logrotate +LIBCURL_ZLIB:zlib
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/syslog-ng/description
|
||||||
|
syslog-ng reads and logs messages to the system console, log
|
||||||
|
files, other machines and/or users as specified by its
|
||||||
|
configuration file.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/syslog-ng/conffiles
|
||||||
|
/etc/syslog-ng.conf
|
||||||
|
/etc/syslog-ng.d/
|
||||||
|
/etc/scl.conf
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/syslog-ng/config
|
||||||
|
config SYSLOGNG_LOGROTATE
|
||||||
|
bool "Logrotate support"
|
||||||
|
depends on PACKAGE_syslog-ng
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
It adds support for logrotate functionality.
|
||||||
|
|
||||||
|
config SYSLOGNG_LOGROTATE_MAXSIZE
|
||||||
|
string "Maximum size of /var/log/messages log file"
|
||||||
|
depends on SYSLOGNG_LOGROTATE
|
||||||
|
default "1M"
|
||||||
|
help
|
||||||
|
Log files are rotated when they grow bigger than defined size bytes.
|
||||||
|
|
||||||
|
config SYSLOGNG_LOGROTATE_ROTATE_COUNT
|
||||||
|
int "Maximum rotation count for /var/log/messages log file"
|
||||||
|
depends on SYSLOGNG_LOGROTATE
|
||||||
|
default 1
|
||||||
|
help
|
||||||
|
Log files are rotated count times before being removed or mailed to
|
||||||
|
the address specified in a mail directive. If count is 0, old
|
||||||
|
versions are removed rather than rotated.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Configure
|
||||||
|
$(SED) 's,-I/usr/include,,' $(PKG_BUILD_DIR)/configure
|
||||||
|
$(Build/Configure/Default)
|
||||||
|
endef
|
||||||
|
|
||||||
|
LOGROTATE_MAXSIZE:=$(call qstrip,$(CONFIG_SYSLOGNG_LOGROTATE_MAXSIZE))
|
||||||
|
LOGROTATE_ROTATE:=$(call qstrip,$(CONFIG_SYSLOGNG_LOGROTATE_ROTATE_COUNT))
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += \
|
||||||
|
--disable-afsnmp \
|
||||||
|
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
|
||||||
|
--disable-tcp-wrapper \
|
||||||
|
--disable-spoof-source \
|
||||||
|
--disable-sql \
|
||||||
|
--disable-linux-caps \
|
||||||
|
--with-jsonc=system \
|
||||||
|
--enable-cpp=no \
|
||||||
|
--enable-json=yes \
|
||||||
|
$(if $(CONFIG_LIBCURL_ZLIB),--enable-http=yes,--enable-http=no) \
|
||||||
|
--disable-smtp \
|
||||||
|
--disable-mqtt \
|
||||||
|
--disable-redis \
|
||||||
|
--disable-dependency-tracking \
|
||||||
|
--disable-python \
|
||||||
|
--disable-geoip2 \
|
||||||
|
--disable-java \
|
||||||
|
--disable-java-modules \
|
||||||
|
--with-librabbitmq-client=no \
|
||||||
|
--with-mongoc=no
|
||||||
|
|
||||||
|
CONFIGURE_VARS += \
|
||||||
|
$(if $(CONFIG_HOST_OS_MACOS),PATH=$(FAKEUNAME_PATH):$(PATH)) \
|
||||||
|
LIBDBI_CFLAGS="-I$(STAGING_DIR)/usr/include"
|
||||||
|
|
||||||
|
define Package/syslog-ng/install
|
||||||
|
cd $(PKG_BUILD_DIR); make DESTDIR=$(1) install
|
||||||
|
|
||||||
|
$(call libtool_remove_files,$(1)) # This removes .la files in folder (including subfolders) /usr/lib
|
||||||
|
rm -rf $(1)/usr/lib/pkgconfig \
|
||||||
|
$(1)/usr/lib/*.a \
|
||||||
|
$(1)/usr/include \
|
||||||
|
$(1)/var
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
|
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
|
||||||
|
$(INSTALL_DIR) $(1)/etc/syslog-ng.d
|
||||||
|
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
|
||||||
|
touch $(1)/etc/syslog-ng.d/.keep
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/sbin
|
||||||
|
$(INSTALL_BIN) ./files/logread $(1)/sbin
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/syslog-ng/include/
|
||||||
|
$(CP) -r ./files/scl $(1)/usr/share/syslog-ng/include/
|
||||||
|
|
||||||
|
ifneq ($(strip $(CONFIG_SYSLOGNG_LOGROTATE)),)
|
||||||
|
$(INSTALL_DIR) $(1)/etc/logrotate.d
|
||||||
|
sed \
|
||||||
|
-e 's#@MAXSIZE@#$(LOGROTATE_MAXSIZE)#g' \
|
||||||
|
-e 's#@ROTATE@#$(LOGROTATE_ROTATE)#g' \
|
||||||
|
./files/syslog-ng.logrotate > $(1)/etc/logrotate.d/syslog-ng.conf
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/syslog-ng/postinst
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -n "$$IPKG_INSTROOT" ] || {
|
||||||
|
/etc/init.d/syslog-ng enable
|
||||||
|
/etc/init.d/syslog-ng restart
|
||||||
|
}
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/syslog-ng/prerm
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
[ -n "$$IPKG_INSTROOT" ] || {
|
||||||
|
/etc/init.d/syslog-ng disable
|
||||||
|
/etc/init.d/syslog-ng stop
|
||||||
|
}
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,syslog-ng))
|
76
packages/admin/syslog-ng/files/logread
Normal file
76
packages/admin/syslog-ng/files/logread
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Shell script compatibility wrapper for /sbin/logread
|
||||||
|
#
|
||||||
|
# Copyright (C) 2019 Dirk Brenken <dev@brenken.org>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
#
|
||||||
|
|
||||||
|
logfile="/var/log/messages"
|
||||||
|
|
||||||
|
if [ ! -f "${logfile}" ]
|
||||||
|
then
|
||||||
|
printf "%s\n" "Error: logfile not found!"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
usage()
|
||||||
|
{
|
||||||
|
printf "%s\n" "Usage: logread [options]"
|
||||||
|
printf "%s\n" "Options:"
|
||||||
|
printf "%5s %-10s%s\n" "-l" "<count>" "Got only the last 'count' messages"
|
||||||
|
printf "%5s %-10s%s\n" "-e" "<pattern>" "Filter messages with a regexp"
|
||||||
|
printf "%5s %-10s%s\n" "-f" "" "Follow log messages"
|
||||||
|
printf "%5s %-10s%s\n" "-h" "" "Print this help message"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "${1}" ]
|
||||||
|
then
|
||||||
|
cat "${logfile}"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
while [ "${1}" ]
|
||||||
|
do
|
||||||
|
case "${1}" in
|
||||||
|
-l)
|
||||||
|
shift
|
||||||
|
count="${1//[^0-9]/}"
|
||||||
|
tail -n "${count:-50}" "${logfile}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-e)
|
||||||
|
shift
|
||||||
|
pattern="${1}"
|
||||||
|
grep -E "${pattern}" "${logfile}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-f)
|
||||||
|
tail -f "${logfile}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-fe)
|
||||||
|
shift
|
||||||
|
pattern="${1}"
|
||||||
|
tail -f "${logfile}" | grep -E "${pattern}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-h|*)
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
fi
|
6
packages/admin/syslog-ng/files/scl/network_localhost/detect.sh
Executable file
6
packages/admin/syslog-ng/files/scl/network_localhost/detect.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
if [ "$(sysctl -n net.ipv6.conf.lo.disable_ipv6)" = "0" ]; then
|
||||||
|
echo 'network(ip("::1") port(514) transport(udp) ip-protocol(6) )'
|
||||||
|
else
|
||||||
|
echo 'network(ip("127.0.0.1") port(514) transport(udp) ip-protocol(4) )'
|
||||||
|
fi
|
@ -0,0 +1 @@
|
|||||||
|
@module confgen context(source) name(network_localhost) exec("`scl-root`/network_localhost/detect.sh")
|
62
packages/admin/syslog-ng/files/syslog-ng.conf
Normal file
62
packages/admin/syslog-ng/files/syslog-ng.conf
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# Collect all local logs into a single file /var/log/messages.
|
||||||
|
# See https://www.syslog-ng.com/technical-documents/list/syslog-ng-open-source-edition
|
||||||
|
|
||||||
|
@version: 4.7
|
||||||
|
@include "scl.conf"
|
||||||
|
|
||||||
|
options {
|
||||||
|
chain_hostnames(no); # Enable or disable the chained hostname format.
|
||||||
|
create_dirs(yes);
|
||||||
|
keep_hostname(yes); # Enable or disable hostname rewriting.
|
||||||
|
log_fifo_size(256); # The number of messages that the output queue can store.
|
||||||
|
log_msg_size(1024); # Maximum length of a message in bytes.
|
||||||
|
stats(freq(0)); # The period between two STATS messages (sent by syslog-ng, containing statistics about dropped logs) in seconds.
|
||||||
|
flush_lines(0); # How many lines are flushed to a destination at a time.
|
||||||
|
use_fqdn(no); # Add Fully Qualified Domain Name instead of short hostname.
|
||||||
|
};
|
||||||
|
|
||||||
|
# syslog-ng gets messages from syslog-ng (internal) and from /dev/log
|
||||||
|
|
||||||
|
source src {
|
||||||
|
internal();
|
||||||
|
unix-dgram("/dev/log");
|
||||||
|
};
|
||||||
|
|
||||||
|
source net {
|
||||||
|
network_localhost();
|
||||||
|
};
|
||||||
|
|
||||||
|
source s_network {
|
||||||
|
default-network-drivers(
|
||||||
|
# NOTE: TLS support
|
||||||
|
#
|
||||||
|
# the default-network-drivers() source driver opens the TLS
|
||||||
|
# enabled ports as well, however without an actual key/cert
|
||||||
|
# pair they will not operate and syslog-ng would display a
|
||||||
|
# warning at startup.
|
||||||
|
#
|
||||||
|
#tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert"))
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
source kernel {
|
||||||
|
file("/proc/kmsg" program_override("kernel"));
|
||||||
|
};
|
||||||
|
|
||||||
|
destination messages {
|
||||||
|
file("/var/log/messages");
|
||||||
|
};
|
||||||
|
|
||||||
|
log {
|
||||||
|
source(src);
|
||||||
|
source(net);
|
||||||
|
source(kernel);
|
||||||
|
destination(messages);
|
||||||
|
|
||||||
|
# uncomment this line to open port 514 to receive messages
|
||||||
|
#source(s_network);
|
||||||
|
};
|
||||||
|
|
||||||
|
# Include any user settings last so that s/he can override or
|
||||||
|
# supplement all "canned" settings inherited from the distribution.
|
||||||
|
@include "/etc/syslog-ng.d/" # Put any customization files in this directory
|
17
packages/admin/syslog-ng/files/syslog-ng.init
Normal file
17
packages/admin/syslog-ng/files/syslog-ng.init
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2006-2019 OpenWrt.org
|
||||||
|
|
||||||
|
START=50
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
[ -f /etc/syslog-ng.conf ] || return 1
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command /usr/sbin/syslog-ng --foreground
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
/usr/sbin/syslog-ng-ctl reload
|
||||||
|
}
|
12
packages/admin/syslog-ng/files/syslog-ng.logrotate
Normal file
12
packages/admin/syslog-ng/files/syslog-ng.logrotate
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/var/log/messages {
|
||||||
|
compress
|
||||||
|
copytruncate
|
||||||
|
delaycompress
|
||||||
|
notifempty
|
||||||
|
maxsize @MAXSIZE@
|
||||||
|
missingok
|
||||||
|
postrotate
|
||||||
|
/usr/sbin/syslog-ng-ctl reload > /dev/null
|
||||||
|
endscript
|
||||||
|
rotate @ROTATE@
|
||||||
|
}
|
460
packages/admin/zabbix/Makefile
Normal file
460
packages/admin/zabbix/Makefile
Normal file
@ -0,0 +1,460 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2006-2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=zabbix
|
||||||
|
PKG_VERSION:=7.0.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://cdn.zabbix.com/zabbix/sources/stable/$(basename $(PKG_VERSION))/ \
|
||||||
|
https://cdn.zabbix.com/zabbix/sources/oldstable/$(basename $(PKG_VERSION))/
|
||||||
|
PKG_HASH:=520641483223f680ef6e685284b556ba34a496d886a38dc3bca085cde21031b1
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
||||||
|
PKG_LICENSE:=AGPL-3.0-only
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:zabbix:zabbix
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
PKG_CONFIG_DEPENDS:= \
|
||||||
|
CONFIG_ZABBIX_MYSQL \
|
||||||
|
CONFIG_ZABBIX_POSTGRESQL \
|
||||||
|
CONFIG_ZABBIX_SQLITE
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/nls.mk
|
||||||
|
|
||||||
|
define Package/zabbix-proxy/config
|
||||||
|
comment "Database Software"
|
||||||
|
|
||||||
|
choice
|
||||||
|
prompt "Selected Database Software"
|
||||||
|
default ZABBIX_POSTGRESQL
|
||||||
|
|
||||||
|
config ZABBIX_MYSQL
|
||||||
|
bool "MySQL/MariaDB"
|
||||||
|
|
||||||
|
config ZABBIX_POSTGRESQL
|
||||||
|
bool "PostgreSQL"
|
||||||
|
|
||||||
|
config ZABBIX_SQLITE
|
||||||
|
bool "SQLite"
|
||||||
|
endchoice
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix/Default
|
||||||
|
SECTION:=admin
|
||||||
|
CATEGORY:=Administration
|
||||||
|
SUBMENU:=Zabbix
|
||||||
|
TITLE:=Zabbix
|
||||||
|
URL:=https://www.zabbix.com/
|
||||||
|
USERID:=zabbix=53:zabbix=53
|
||||||
|
DEPENDS+=$(ICONV_DEPENDS) +libpcre2 +zlib
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-agentd
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= agentd
|
||||||
|
DEPENDS+= +libevent2-pthreads
|
||||||
|
PROVIDES:=zabbix-agentd
|
||||||
|
VARIANT:=nossl
|
||||||
|
DEFAULT_VARIANT:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-agentd-openssl
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= agentd (with OpenSSL)
|
||||||
|
DEPENDS+= +libevent2-pthreads +libopenssl
|
||||||
|
PROVIDES:=zabbix-agentd
|
||||||
|
VARIANT:=openssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-agentd-gnutls
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= agentd (with GnuTLS)
|
||||||
|
DEPENDS+= +libevent2-pthreads +libgnutls
|
||||||
|
PROVIDES:=zabbix-agentd
|
||||||
|
VARIANT:=gnutls
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-mac80211
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= discovery/userparameters for mac80211
|
||||||
|
DEPENDS = +zabbix-agentd @PACKAGE_MAC80211_DEBUGFS @KERNEL_DEBUG_FS
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-network
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= discovery/userparameters for network
|
||||||
|
DEPENDS = +zabbix-agentd +libubus-lua +lua
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-wifi
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= discovery/userparameters for wifi
|
||||||
|
DEPENDS = +zabbix-agentd +libiwinfo-lua +libubus-lua +lua
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-sender
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= sender
|
||||||
|
PROVIDES:=zabbix-sender
|
||||||
|
VARIANT:=nossl
|
||||||
|
DEFAULT_VARIANT:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-sender-openssl
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= sender (with OpenSSL)
|
||||||
|
DEPENDS+= +libopenssl
|
||||||
|
PROVIDES:=zabbix-sender
|
||||||
|
VARIANT:=openssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-sender-gnutls
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= sender (with GnuTLS)
|
||||||
|
DEPENDS+= +libgnutls
|
||||||
|
PROVIDES:=zabbix-sender
|
||||||
|
VARIANT:=gnutls
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-get
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= get
|
||||||
|
PROVIDES:=zabbix-get
|
||||||
|
VARIANT:=nossl
|
||||||
|
DEFAULT_VARIANT:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-get-openssl
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= get (with OpenSSL)
|
||||||
|
DEPENDS+= +libopenssl
|
||||||
|
PROVIDES:=zabbix-get
|
||||||
|
VARIANT:=openssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-get-gnutls
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= get (with GnuTLS)
|
||||||
|
DEPENDS+= +libgnutls
|
||||||
|
PROVIDES:=zabbix-get
|
||||||
|
VARIANT:=gnutls
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-server/Default
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= server
|
||||||
|
DEPENDS += +ZABBIX_POSTGRESQL:libpq \
|
||||||
|
+ZABBIX_MYSQL:libmariadbclient \
|
||||||
|
@(!ZABBIX_SQLITE) \
|
||||||
|
+libevent2 \
|
||||||
|
+libevent2-pthreads \
|
||||||
|
+fping
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-server
|
||||||
|
$(call Package/zabbix-server/Default)
|
||||||
|
PROVIDES:=zabbix-server
|
||||||
|
VARIANT:=nossl
|
||||||
|
DEFAULT_VARIANT:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-server-openssl
|
||||||
|
$(call Package/zabbix-server/Default)
|
||||||
|
TITLE+= (with OpenSSL)
|
||||||
|
PROVIDES:=zabbix-server
|
||||||
|
DEPENDS+= +libopenssl
|
||||||
|
VARIANT:=openssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-server-gnutls
|
||||||
|
$(call Package/zabbix-server/Default)
|
||||||
|
TITLE+= (with GnuTLS)
|
||||||
|
PROVIDES:=zabbix-server
|
||||||
|
DEPENDS+= +libgnutls
|
||||||
|
VARIANT:=gnutls
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-server-frontend
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= server-frontend
|
||||||
|
DEPENDS += +php8 \
|
||||||
|
+php8-cgi \
|
||||||
|
+php8-mod-gd \
|
||||||
|
+php8-mod-bcmath \
|
||||||
|
+php8-mod-ctype \
|
||||||
|
+php8-mod-xmlreader \
|
||||||
|
+php8-mod-xmlwriter \
|
||||||
|
+php8-mod-session \
|
||||||
|
+php8-mod-sockets \
|
||||||
|
+php8-mod-mbstring \
|
||||||
|
+php8-mod-gettext \
|
||||||
|
+ZABBIX_POSTGRESQL:php8-mod-pgsql \
|
||||||
|
+ZABBIX_MYSQL:php8-mod-mysqli \
|
||||||
|
@(!ZABBIX_SQLITE)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-proxy/Default
|
||||||
|
$(call Package/zabbix/Default)
|
||||||
|
TITLE+= proxy
|
||||||
|
DEPENDS += +ZABBIX_POSTGRESQL:libpq \
|
||||||
|
+ZABBIX_MYSQL:libmariadbclient \
|
||||||
|
+ZABBIX_SQLITE:libsqlite3 \
|
||||||
|
+libevent2 \
|
||||||
|
+libevent2-pthreads \
|
||||||
|
+fping
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-proxy
|
||||||
|
$(call Package/zabbix-proxy/Default)
|
||||||
|
PROVIDES:=zabbix-proxy
|
||||||
|
VARIANT:=nossl
|
||||||
|
DEFAULT_VARIANT:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-proxy-openssl
|
||||||
|
$(call Package/zabbix-proxy/Default)
|
||||||
|
TITLE+= (with OpenSSL)
|
||||||
|
PROVIDES:=zabbix-proxy
|
||||||
|
DEPENDS+= +libopenssl
|
||||||
|
VARIANT:=openssl
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-proxy-gnutls
|
||||||
|
$(call Package/zabbix-proxy/Default)
|
||||||
|
TITLE+= (with GnuTLS)
|
||||||
|
PROVIDES:=zabbix-proxy
|
||||||
|
DEPENDS+= +libgnutls
|
||||||
|
VARIANT:=gnutls
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-mac80211/description
|
||||||
|
An extra package for zabbix-agentd that adds a discovery rule for mac80211 wifi phy and many userparameters.
|
||||||
|
It contains an suid helper to allow zabbix-agentd to still run as zabbix user and not as root.
|
||||||
|
See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-network/description
|
||||||
|
An extra package for zabbix-agentd that adds a discovery rule for openwrt network interfaces.
|
||||||
|
The idea here is to discover only interfaces listed in /etc/config/network (discover br-lan and not eth0.1 and wlan0)
|
||||||
|
See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-wifi/description
|
||||||
|
An extra package for zabbix-agentd that adds a discovery rule for wifi interfaces and many userparameters.
|
||||||
|
As it uses libiwinfo, it works with all wifi devices supported by openwrt.
|
||||||
|
See https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use zabbix templates.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS+= \
|
||||||
|
--enable-agent \
|
||||||
|
$(if $(CONFIG_ZABBIX_SQLITE),--disable-server,--enable-server) \
|
||||||
|
--enable-proxy \
|
||||||
|
$(call autoconf_bool,CONFIG_IPV6,ipv6) \
|
||||||
|
--disable-java \
|
||||||
|
$(if $(CONFIG_ZABBIX_MYSQL),--with-mysql) \
|
||||||
|
$(if $(CONFIG_ZABBIX_POSTGRESQL),--with-postgresql) \
|
||||||
|
$(if $(CONFIG_ZABBIX_SQLITE),--with-sqlite3=$(STAGING_DIR)/usr) \
|
||||||
|
--with-libevent=$(STAGING_DIR)/usr/include \
|
||||||
|
--with-libpcre2=$(STAGING_DIR)/usr/include \
|
||||||
|
--with-zlib=$(STAGING_DIR)/usr/include
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),openssl)
|
||||||
|
CONFIGURE_ARGS+= --with-openssl="$(STAGING_DIR)/usr"
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(BUILD_VARIANT),gnutls)
|
||||||
|
CONFIGURE_ARGS+= --with-gnutls="$(STAGING_DIR)/usr"
|
||||||
|
endif
|
||||||
|
|
||||||
|
CONFIGURE_VARS += \
|
||||||
|
ac_cv_header_sys_sysinfo_h=no
|
||||||
|
|
||||||
|
MAKE_FLAGS += ARCH="linux"
|
||||||
|
|
||||||
|
define Package/zabbix/install/sbin
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/usr/sbin
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/sbin/zabbix_$(2) \
|
||||||
|
$(1)/usr/sbin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix/install/bin
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/usr/bin
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/bin/zabbix_$(2) \
|
||||||
|
$(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix/install/etc
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/etc
|
||||||
|
|
||||||
|
$(INSTALL_CONF) \
|
||||||
|
$(PKG_INSTALL_DIR)/etc/zabbix_$(2).conf \
|
||||||
|
$(1)/etc/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix/install/init.d
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/etc/init.d
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
./files/zabbix_$(2).init \
|
||||||
|
$(1)/etc/init.d/zabbix_$(2)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix/install/zabbix.conf.d
|
||||||
|
$(INSTALL_DIR) \
|
||||||
|
$(1)/etc/zabbix_agentd.conf.d
|
||||||
|
|
||||||
|
$(INSTALL_BIN) \
|
||||||
|
./files/$(2) \
|
||||||
|
$(1)/etc/zabbix_agentd.conf.d/$(2)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-agentd/conffiles
|
||||||
|
/etc/zabbix_agentd.conf
|
||||||
|
endef
|
||||||
|
Package/zabbix-agentd-openssl/conffiles = $(Package/zabbix-agentd/conffiles)
|
||||||
|
Package/zabbix-agentd-gnutls/conffiles = $(Package/zabbix-agentd/conffiles)
|
||||||
|
|
||||||
|
define Package/zabbix-server/conffiles
|
||||||
|
/etc/zabbix_server.conf
|
||||||
|
endef
|
||||||
|
Package/zabbix-server-openssl/conffiles = $(Package/zabbix-server/conffiles)
|
||||||
|
Package/zabbix-server-gnutls/conffiles = $(Package/zabbix-server/conffiles)
|
||||||
|
|
||||||
|
define Package/zabbix-proxy/conffiles
|
||||||
|
/etc/zabbix_proxy.conf
|
||||||
|
endef
|
||||||
|
Package/zabbix-proxy-openssl/conffiles = $(Package/zabbix-proxy/conffiles)
|
||||||
|
Package/zabbix-proxy-gnutls/conffiles = $(Package/zabbix-proxy/conffiles)
|
||||||
|
|
||||||
|
ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
|
||||||
|
define Build/Prepare/zabbix-extra-mac80211
|
||||||
|
mkdir -p $(PKG_BUILD_DIR)/zabbix-extra-mac80211
|
||||||
|
$(CP) ./files/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile/zabbix-extra-mac80211
|
||||||
|
$(TARGET_CC) $(TARGET_CFLAGS) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211.c -o $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
$(call Build/Prepare/Default)
|
||||||
|
$(call Build/Prepare/zabbix-extra-mac80211)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Build/Compile
|
||||||
|
$(call Build/Compile/Default)
|
||||||
|
$(call Build/Compile/zabbix-extra-mac80211)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-agentd/install
|
||||||
|
$(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
|
||||||
|
$(call Package/zabbix/install/sbin,$(1),agentd)
|
||||||
|
$(call Package/zabbix/install/etc,$(1),agentd)
|
||||||
|
$(call Package/zabbix/install/init.d,$(1),agentd)
|
||||||
|
endef
|
||||||
|
Package/zabbix-agentd-openssl/install = $(Package/zabbix-agentd/install)
|
||||||
|
Package/zabbix-agentd-gnutls/install = $(Package/zabbix-agentd/install)
|
||||||
|
|
||||||
|
define Package/zabbix-extra-mac80211/install
|
||||||
|
$(call Package/zabbix/install/zabbix.conf.d,$(1),mac80211)
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/zabbix-extra-mac80211/zabbix_helper_mac80211 $(1)/usr/bin/
|
||||||
|
chmod 4755 $(1)/usr/bin/zabbix_helper_mac80211
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-network/install
|
||||||
|
$(call Package/zabbix/install/zabbix.conf.d,$(1),network)
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/acl.d
|
||||||
|
$(INSTALL_DATA) ./files/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-network/postinst
|
||||||
|
#!/bin/sh
|
||||||
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||||
|
killall -s HUP ubusd
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-wifi/install
|
||||||
|
$(call Package/zabbix/install/zabbix.conf.d,$(1),wifi)
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/acl.d
|
||||||
|
$(INSTALL_DATA) ./files/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-extra-wifi/postinst
|
||||||
|
#!/bin/sh
|
||||||
|
if [ -z "$${IPKG_INSTROOT}" ]; then
|
||||||
|
killall -s HUP ubusd
|
||||||
|
fi
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-sender/install
|
||||||
|
$(call Package/zabbix/install/bin,$(1),sender)
|
||||||
|
endef
|
||||||
|
Package/zabbix-sender-openssl/install = $(Package/zabbix-sender/install)
|
||||||
|
Package/zabbix-sender-gnutls/install = $(Package/zabbix-sender/install)
|
||||||
|
|
||||||
|
define Package/zabbix-get/install
|
||||||
|
$(call Package/zabbix/install/bin,$(1),get)
|
||||||
|
endef
|
||||||
|
Package/zabbix-get-openssl/install = $(Package/zabbix-get/install)
|
||||||
|
Package/zabbix-get-gnutls/install = $(Package/zabbix-get/install)
|
||||||
|
|
||||||
|
define Package/zabbix-server/install
|
||||||
|
$(call Package/zabbix/install/sbin,$(1),server)
|
||||||
|
$(call Package/zabbix/install/etc,$(1),server)
|
||||||
|
endef
|
||||||
|
Package/zabbix-server-openssl/install = $(Package/zabbix-server/install)
|
||||||
|
Package/zabbix-server-gnutls/install = $(Package/zabbix-server/install)
|
||||||
|
|
||||||
|
define Package/zabbix-server-frontend/install
|
||||||
|
$(INSTALL_DIR) $(1)/www/zabbix
|
||||||
|
$(CP) $(PKG_BUILD_DIR)/ui/* $(1)/www/zabbix
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/zabbix-proxy/install
|
||||||
|
$(call Package/zabbix/install/sbin,$(1),proxy)
|
||||||
|
$(call Package/zabbix/install/etc,$(1),proxy)
|
||||||
|
endef
|
||||||
|
Package/zabbix-proxy-openssl/install = $(Package/zabbix-proxy/install)
|
||||||
|
Package/zabbix-proxy-gnutls/install = $(Package/zabbix-proxy/install)
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,zabbix-agentd))
|
||||||
|
$(eval $(call BuildPackage,zabbix-agentd-openssl))
|
||||||
|
$(eval $(call BuildPackage,zabbix-agentd-gnutls))
|
||||||
|
$(eval $(call BuildPackage,zabbix-extra-mac80211))
|
||||||
|
$(eval $(call BuildPackage,zabbix-extra-network))
|
||||||
|
$(eval $(call BuildPackage,zabbix-extra-wifi))
|
||||||
|
$(eval $(call BuildPackage,zabbix-sender))
|
||||||
|
$(eval $(call BuildPackage,zabbix-sender-openssl))
|
||||||
|
$(eval $(call BuildPackage,zabbix-sender-gnutls))
|
||||||
|
$(eval $(call BuildPackage,zabbix-server))
|
||||||
|
$(eval $(call BuildPackage,zabbix-server-openssl))
|
||||||
|
$(eval $(call BuildPackage,zabbix-server-gnutls))
|
||||||
|
$(eval $(call BuildPackage,zabbix-server-frontend))
|
||||||
|
$(eval $(call BuildPackage,zabbix-proxy))
|
||||||
|
$(eval $(call BuildPackage,zabbix-proxy-openssl))
|
||||||
|
$(eval $(call BuildPackage,zabbix-proxy-gnutls))
|
||||||
|
$(eval $(call BuildPackage,zabbix-get))
|
||||||
|
$(eval $(call BuildPackage,zabbix-get-openssl))
|
||||||
|
$(eval $(call BuildPackage,zabbix-get-gnutls))
|
29
packages/admin/zabbix/files/mac80211
Normal file
29
packages/admin/zabbix/files/mac80211
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates
|
||||||
|
|
||||||
|
# If you want to know the exact meaning of an UserParameter, you can search in the ieee80211 standard:
|
||||||
|
# https://standards.ieee.org/getieee802/download/802.11-2012.pdf
|
||||||
|
# example: for mac80211.ACKFailureCount search for dot11ACKFailureCount (page 2145)
|
||||||
|
|
||||||
|
# mac80211 phy discovery (like 'phy0')
|
||||||
|
# example: {"data":[{"{#PHY}":"phy0"}]}
|
||||||
|
#
|
||||||
|
UserParameter=mac80211.phydiscovery,zabbix_helper_mac80211 discovery
|
||||||
|
|
||||||
|
#phy statistics (you need {#PHY} as parameter)
|
||||||
|
#
|
||||||
|
UserParameter=mac80211.ACKFailureCount[*],zabbix_helper_mac80211 $1 dot11ACKFailureCount
|
||||||
|
UserParameter=mac80211.FCSErrorCount[*],zabbix_helper_mac80211 $1 dot11FCSErrorCount
|
||||||
|
UserParameter=mac80211.RTSFailureCount[*],zabbix_helper_mac80211 $1 dot11RTSFailureCount
|
||||||
|
UserParameter=mac80211.RTSSuccessCount[*],zabbix_helper_mac80211 $1 dot11RTSSuccessCount
|
||||||
|
|
||||||
|
# hidden behind MAC80211_DEBUG_COUNTERS
|
||||||
|
UserParameter=mac80211.FailedCount[*],zabbix_helper_mac80211 $1 dot11FailedCount
|
||||||
|
UserParameter=mac80211.FrameDuplicateCount[*],zabbix_helper_mac80211 $1 dot11FrameDuplicateCount
|
||||||
|
UserParameter=mac80211.MulticastReceivedFrameCount[*],zabbix_helper_mac80211 $1 dot11MulticastReceivedFrameCount
|
||||||
|
UserParameter=mac80211.MulticastTransmittedFrameCount[*],zabbix_helper_mac80211 $1 dot11MulticastTransmittedFrameCount
|
||||||
|
UserParameter=mac80211.MultipleRetryCount[*],zabbix_helper_mac80211 $1 dot11MultipleRetryCount
|
||||||
|
UserParameter=mac80211.ReceivedFragmentCount[*],zabbix_helper_mac80211 $1 dot11ReceivedFragmentCount
|
||||||
|
UserParameter=mac80211.RetryCount[*],zabbix_helper_mac80211 $1 dot11RetryCount
|
||||||
|
UserParameter=mac80211.TransmittedFragmentCount[*],zabbix_helper_mac80211 $1 dot11TransmittedFragmentCount
|
||||||
|
UserParameter=mac80211.TransmittedFrameCount[*],zabbix_helper_mac80211 $1 dot11TransmittedFrameCount
|
||||||
|
|
6
packages/admin/zabbix/files/network
Normal file
6
packages/admin/zabbix/files/network
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates
|
||||||
|
|
||||||
|
# network interface discovery
|
||||||
|
# example: {"data":[{"{#IF}":"lo", "{#NET}":"loopback"},{"{#IF}":"br-lan", "{#NET}":"lan"},{"{#IF}":"eth0.1", "{#NET}":"wan"}]}
|
||||||
|
#
|
||||||
|
UserParameter=netowrt.discovery,lua -l ubus -e 'u=ubus.connect();list="{\"data\":[";dump=u:call("network.interface", "dump", {});for _, intf in ipairs(dump.interface) do list=list.."{\"{#IF}\":\""..(intf.device or intf.l3_device).."\", \"{#NET}\":\""..intf.interface.."\"},";end;list=string.gsub(list,",$","");print(list.."]}")'
|
24
packages/admin/zabbix/files/wifi
Normal file
24
packages/admin/zabbix/files/wifi
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#see https://openwrt.org/docs/guide-user/services/network_monitoring/zabbix for ready to use templates
|
||||||
|
|
||||||
|
# wifi interface discovery
|
||||||
|
# example: {"data":[{"{#IF}":"wlan0", "{#MODE}":"ap", "{#SSID}":"Openwrt", "{#NET}":"lan", "{#DEV}":"radio0", "{#ENC}":"psk2+ccmp", "{#TYPE}":"mac80211", "{#HWMODE}":"11ng", "{#CHANNEL}":"11", "{#BSSID}":"xx:xx:xx:xx:xx:xx"}]}
|
||||||
|
UserParameter=wifi.ifdiscovery, lua -l ubus -l iwinfo -e 'u=ubus.connect();list="{\"data\":[";stat=u:call("network.wireless", "status", {});for dev, dev_table in pairs(stat) do for i, iface in pairs(dev_table["interfaces"]) do c=iface["config"];i=iface["ifname"];t=iwinfo.type(i);iw=iwinfo[t];e = iw.encryption(i);e = e and e.description or "None";n = table.concat(c["network"]," ");list=list.."{\"{#IF}\":\""..i.."\", \"{#MODE}\":\""..iw.mode(i).."\", \"{#SSID}\":\""..c["ssid"].."\", \"{#NET}\":\""..n.."\", \"{#DEV}\":\""..dev.."\", \"{#ENC}\":\""..e.."\", \"{#TYPE}\":\""..t.."\", \"{#HWMODE}\":\"".."?".."\", \"{#CHANNEL}\":\""..iw.channel(i).."\", \"{#BSSID}\":\""..iw.bssid(i).."\"},";end;end;list=string.gsub(list,",$","");print(list.."]}")'
|
||||||
|
|
||||||
|
|
||||||
|
#iwinfo info (you need {#IF} as parameter, like 'wlan0')
|
||||||
|
UserParameter=wifi.iwinfo.channel[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].channel('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.frequency[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].frequency('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.txpower[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].txpower('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.bitrate[*],lua -l iwinfo -e "b = iwinfo[iwinfo.type('$1')].bitrate('$1'); print(b or '0')"
|
||||||
|
UserParameter=wifi.iwinfo.signal[*],lua -l iwinfo -e "s = iwinfo[iwinfo.type('$1')].signal('$1'); print(s or '-255')"
|
||||||
|
UserParameter=wifi.iwinfo.noise[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].noise('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.quality[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.quality_max[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].quality_max('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.mode[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].mode('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.ssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].ssid('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.bssid[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].bssid('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.country[*],lua -l iwinfo -e "print(iwinfo[iwinfo.type('$1')].country('$1'))"
|
||||||
|
UserParameter=wifi.iwinfo.nbusers[*],lua -l iwinfo -e "n = 0; for _,_ in pairs(iwinfo[iwinfo.type('$1')].assoclist('$1')) do n = n + 1 end; print(n)"
|
||||||
|
UserParameter=wifi.iwinfo.encryption[*],lua -l iwinfo -e "e = iwinfo[iwinfo.type('$1')].encryption('$1'); print(e and e.description or 'None')"
|
||||||
|
UserParameter=wifi.iwinfo.hwmode[*],lua -l iwinfo -e "x=iwinfo[iwinfo.type('$1')].hwmodelist('$1'); print((x.a and 'a' or '')..(x.b and 'b' or '')..(x.g and 'g' or '')..(x.n and 'n' or ''))"
|
||||||
|
|
8
packages/admin/zabbix/files/zabbix-network-ubus-acl.json
Normal file
8
packages/admin/zabbix/files/zabbix-network-ubus-acl.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"user": "zabbix",
|
||||||
|
"access": {
|
||||||
|
"network.interface": {
|
||||||
|
"methods": [ "dump" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
packages/admin/zabbix/files/zabbix-wifi-ubus-acl.json
Normal file
8
packages/admin/zabbix/files/zabbix-wifi-ubus-acl.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"user": "zabbix",
|
||||||
|
"access": {
|
||||||
|
"network.wireless": {
|
||||||
|
"methods": [ "status" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
23
packages/admin/zabbix/files/zabbix_agentd.init
Executable file
23
packages/admin/zabbix/files/zabbix_agentd.init
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2008-2011 OpenWrt.org
|
||||||
|
|
||||||
|
START=60
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
PROG=/usr/sbin/zabbix_agentd
|
||||||
|
CONFIG=/etc/zabbix_agentd.conf
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
# Sometimes the agentd config was installed in /etc/zabbix/zabbix_agentd.conf
|
||||||
|
[ -f /etc/zabbix/zabbix_agentd.conf ] && mv /etc/zabbix/zabbix_agentd.conf ${CONFIG}
|
||||||
|
|
||||||
|
[ -f ${CONFIG} ] || return 1
|
||||||
|
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command ${PROG} -c ${CONFIG} -f
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_set_param stdout 1
|
||||||
|
procd_set_param stderr 1
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
|
78
packages/admin/zabbix/files/zabbix_helper_mac80211.c
Normal file
78
packages/admin/zabbix/files/zabbix_helper_mac80211.c
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
#define _GNU_SOURCE
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <libgen.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <dirent.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
int discovery()
|
||||||
|
{
|
||||||
|
DIR *dir;
|
||||||
|
struct dirent *ent;
|
||||||
|
bool comma = false;
|
||||||
|
if ((dir = opendir ("/sys/kernel/debug/ieee80211/")) != NULL) {
|
||||||
|
printf("{\"data\":[");
|
||||||
|
while ((ent = readdir (dir)) != NULL) {
|
||||||
|
if (strcmp(".", ent->d_name) && strcmp("..", ent->d_name)) {
|
||||||
|
if (comma)
|
||||||
|
printf(",");
|
||||||
|
printf("{\"{#PHY}\":\"%s\"}", ent->d_name);
|
||||||
|
comma = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
printf("]}\n");
|
||||||
|
closedir(dir);
|
||||||
|
} else {
|
||||||
|
perror("");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_param(char *phy, char *stat)
|
||||||
|
{
|
||||||
|
char *filename = NULL;
|
||||||
|
FILE *f = NULL;
|
||||||
|
phy = basename(phy);
|
||||||
|
stat = basename(stat);
|
||||||
|
if (asprintf(&filename, "/sys/kernel/debug/ieee80211/%s/statistics/%s", phy, stat) > 0)
|
||||||
|
f = fopen(filename, "r");
|
||||||
|
|
||||||
|
if (f != NULL) {
|
||||||
|
char temp[256];
|
||||||
|
while (fgets(temp, 256, f) != NULL)
|
||||||
|
printf("%s",temp);
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
} else {
|
||||||
|
perror("");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
free(filename);
|
||||||
|
return EXIT_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
int usage(char *name)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "Usage:\n");
|
||||||
|
fprintf(stderr, " %s discovery\n", name);
|
||||||
|
fprintf(stderr, " => print mac80211.phydiscovery discovery rule\n");
|
||||||
|
fprintf(stderr, " %s PHY STAT\n", name);
|
||||||
|
fprintf(stderr, " => cat /sys/kernel/debug/ieee80211/PHY/statistics/STAT as root\n");
|
||||||
|
return EXIT_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (argc) {
|
||||||
|
case 2:
|
||||||
|
return discovery();
|
||||||
|
case 3:
|
||||||
|
return get_param(argv[1], argv[2]);
|
||||||
|
default:
|
||||||
|
return usage(argv[0]);
|
||||||
|
}
|
||||||
|
}
|
65
packages/admin/zabbix/patches/010-change-agentd-config.patch
Normal file
65
packages/admin/zabbix/patches/010-change-agentd-config.patch
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
--- a/conf/zabbix_agentd.conf
|
||||||
|
+++ b/conf/zabbix_agentd.conf
|
||||||
|
@@ -3,12 +3,11 @@
|
||||||
|
|
||||||
|
############ GENERAL PARAMETERS #################
|
||||||
|
|
||||||
|
-### Option: PidFile
|
||||||
|
-# Name of PID file.
|
||||||
|
-#
|
||||||
|
-# Mandatory: no
|
||||||
|
-# Default:
|
||||||
|
-# PidFile=/tmp/zabbix_agentd.pid
|
||||||
|
+# We do not need PidFile with procd
|
||||||
|
+# PidFile=/var/run/zabbix_agentd.pid
|
||||||
|
+
|
||||||
|
+# use syslog
|
||||||
|
+LogType=system
|
||||||
|
|
||||||
|
### Option: LogType
|
||||||
|
# Specifies where log messages are written to:
|
||||||
|
@@ -27,8 +26,6 @@
|
||||||
|
# Default:
|
||||||
|
# LogFile=
|
||||||
|
|
||||||
|
-LogFile=/tmp/zabbix_agentd.log
|
||||||
|
-
|
||||||
|
### Option: LogFileSize
|
||||||
|
# Maximum size of log file in MB.
|
||||||
|
# 0 - disable automatic log rotation.
|
||||||
|
@@ -136,6 +133,7 @@ Server=127.0.0.1
|
||||||
|
# Range: 0-100
|
||||||
|
# Default:
|
||||||
|
# StartAgents=10
|
||||||
|
+StartAgents=1
|
||||||
|
|
||||||
|
##### Active checks related
|
||||||
|
|
||||||
|
@@ -164,8 +162,6 @@ Server=127.0.0.1
|
||||||
|
# Default:
|
||||||
|
# ServerActive=
|
||||||
|
|
||||||
|
-ServerActive=127.0.0.1
|
||||||
|
-
|
||||||
|
### Option: Hostname
|
||||||
|
# List of comma delimited unique, case sensitive hostnames.
|
||||||
|
# Required for active checks and must match hostnames as configured on the server.
|
||||||
|
@@ -175,8 +171,6 @@ ServerActive=127.0.0.1
|
||||||
|
# Default:
|
||||||
|
# Hostname=
|
||||||
|
|
||||||
|
-Hostname=Zabbix server
|
||||||
|
-
|
||||||
|
### Option: HostnameItem
|
||||||
|
# Item used for generating Hostname if it is undefined. Ignored if Hostname is defined.
|
||||||
|
# Does not support UserParameters or aliases.
|
||||||
|
@@ -326,8 +320,8 @@ Hostname=Zabbix server
|
||||||
|
# Include=
|
||||||
|
|
||||||
|
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
|
||||||
|
-# Include=/usr/local/etc/zabbix_agentd.conf.d/
|
||||||
|
# Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf
|
||||||
|
+Include=/etc/zabbix_agentd.conf.d/
|
||||||
|
|
||||||
|
####### USER-DEFINED MONITORED PARAMETERS #######
|
||||||
|
|
11
packages/admin/zabbix/patches/110-reproducible-builds.patch
Normal file
11
packages/admin/zabbix/patches/110-reproducible-builds.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/src/libs/zbxcommon/misc.c
|
||||||
|
+++ b/src/libs/zbxcommon/misc.c
|
||||||
|
@@ -223,7 +223,7 @@ static const char copyright_message[] =
|
||||||
|
void zbx_print_version(const char *title_message)
|
||||||
|
{
|
||||||
|
printf("%s (Zabbix) %s\n", title_message, ZABBIX_VERSION);
|
||||||
|
- printf("Revision %s %s, compilation time: %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE, __DATE__, __TIME__);
|
||||||
|
+ printf("Revision %s %s\n\n", ZABBIX_REVISION, ZABBIX_REVDATE);
|
||||||
|
puts(copyright_message);
|
||||||
|
}
|
||||||
|
|
71
packages/devel/autoconf/Makefile
Normal file
71
packages/devel/autoconf/Makefile
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2015 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=autoconf
|
||||||
|
PKG_VERSION:=2.72
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_URL:=@GNU/autoconf
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
PKG_HASH:=ba885c1319578d6c94d46e9b0dceb4014caafe2490e437a0dbca3f270a223f5a
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||||
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYINGv3 COPYING.EXCEPTION
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/autoconf
|
||||||
|
SECTION:=devel
|
||||||
|
CATEGORY:=Development
|
||||||
|
TITLE:=autoconf
|
||||||
|
URL:=https://www.gnu.org/software/autoconf/
|
||||||
|
DEPENDS:=+m4 +perl +perlbase-data +perlbase-file +perlbase-getopt \
|
||||||
|
+perlbase-dynaloader +perlbase-text
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/autoconf/description
|
||||||
|
Autoconf is an extensible package of M4 macros that produce shell scripts to
|
||||||
|
automatically configure software source code packages.
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_VARS += M4=m4 EMACS=no
|
||||||
|
|
||||||
|
FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g'
|
||||||
|
|
||||||
|
define Package/autoconf/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
||||||
|
grep -rEl "#\!.*perl" $(1)/usr/bin/ | xargs $(FIX_PATHS)
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/autoconf
|
||||||
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/INSTALL \
|
||||||
|
$(1)/usr/share/autoconf/
|
||||||
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autom4te.cfg \
|
||||||
|
$(1)/usr/share/autoconf/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/autoconf/Autom4te
|
||||||
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/Autom4te/* \
|
||||||
|
$(1)/usr/share/autoconf/Autom4te/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/autoconf/autoconf
|
||||||
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoconf/* \
|
||||||
|
$(1)/usr/share/autoconf/autoconf/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/autoconf/autoscan
|
||||||
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autoscan/* \
|
||||||
|
$(1)/usr/share/autoconf/autoscan/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/autoconf/autotest
|
||||||
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/autotest/* \
|
||||||
|
$(1)/usr/share/autoconf/autotest/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/autoconf/m4sugar
|
||||||
|
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/autoconf/m4sugar/* \
|
||||||
|
$(1)/usr/share/autoconf/m4sugar/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,autoconf))
|
8
packages/devel/autoconf/test.sh
Normal file
8
packages/devel/autoconf/test.sh
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
autoconf --version | grep $2 && \
|
||||||
|
autoheader --version | grep $2 && \
|
||||||
|
autom4te --version | grep $2 && \
|
||||||
|
autoreconf --version | grep $2 && \
|
||||||
|
autoscan --version | grep $2 && \
|
||||||
|
autoupdate --version | grep $2 && \
|
||||||
|
ifnames --version | grep $2
|
71
packages/devel/automake/Makefile
Normal file
71
packages/devel/automake/Makefile
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#
|
||||||
|
# Copyright (C) 2015-2016 OpenWrt.org
|
||||||
|
#
|
||||||
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
|
# See /LICENSE for more information.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=automake
|
||||||
|
PKG_VERSION:=1.16.5
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_URL:=@GNU/automake
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
PKG_HASH:=f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Heinrich Schuchardt <xypron.glpk@gmx.de>
|
||||||
|
PKG_LICENSE:=GPL-2.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:gnu:automake
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/automake
|
||||||
|
SECTION:=devel
|
||||||
|
CATEGORY:=Development
|
||||||
|
TITLE:=automake
|
||||||
|
URL:=https://www.gnu.org/software/automake/
|
||||||
|
DEPENDS:=+autoconf +perlbase-thread +perlbase-attributes
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/automake/description
|
||||||
|
Automake is a tool for automatically generating Makefile.in files compliant
|
||||||
|
with the GNU Coding Standards.
|
||||||
|
endef
|
||||||
|
|
||||||
|
FIX_PATHS = $(SED) '1c \#!/usr/bin/perl' -e 's| /[^ ]*/bin/perl| /usr/bin/perl|g'
|
||||||
|
|
||||||
|
AM_VERSION:=$(word 1,$(subst ., ,$(PKG_VERSION))).$(word 2,$(subst ., ,$(PKG_VERSION)))
|
||||||
|
|
||||||
|
define Package/automake/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/automake-$(AM_VERSION) \
|
||||||
|
$(1)/usr/bin/automake-$(AM_VERSION)
|
||||||
|
$(LN) automake-$(AM_VERSION) $(1)/usr/bin/automake
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/aclocal-$(AM_VERSION) \
|
||||||
|
$(1)/usr/bin/aclocal-$(AM_VERSION)
|
||||||
|
$(LN) aclocal-$(AM_VERSION) $(1)/usr/bin/aclocal
|
||||||
|
$(FIX_PATHS) $(1)/usr/bin/automake-$(AM_VERSION)
|
||||||
|
$(FIX_PATHS) $(1)/usr/bin/aclocal-$(AM_VERSION)
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/automake-$(AM_VERSION)
|
||||||
|
|
||||||
|
for dir in \
|
||||||
|
automake-$(AM_VERSION) automake-$(AM_VERSION)/Automake \
|
||||||
|
automake-$(AM_VERSION)/am aclocal \
|
||||||
|
aclocal-$(AM_VERSION) aclocal-$(AM_VERSION)/internal \
|
||||||
|
; do \
|
||||||
|
$(INSTALL_DIR) $(1)/usr/share/$$$$dir; \
|
||||||
|
for file in $$$$(cd $(PKG_INSTALL_DIR) && \
|
||||||
|
find usr/share/$$$$dir -maxdepth 1 -type f); do \
|
||||||
|
$(INSTALL_DATA) $$(PKG_INSTALL_DIR)/$$$$file \
|
||||||
|
$(1)/$$$$file; \
|
||||||
|
done; \
|
||||||
|
done
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,automake))
|
44
packages/devel/bison/Makefile
Normal file
44
packages/devel/bison/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# SPDX-Identifier-License: GPL-2.0-only
|
||||||
|
#
|
||||||
|
# Copyright (C) 2022 W. Michael Petullo <mike@flyn.org>
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=bison
|
||||||
|
PKG_VERSION:=3.8.2
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||||
|
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
||||||
|
PKG_HASH:=9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
|
||||||
|
PKG_LICENSE:=GPL-3.0-or-later
|
||||||
|
PKG_LICENSE_FILES:=COPYING
|
||||||
|
PKG_CPE_ID:=cpe:/a:gnu:bison
|
||||||
|
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
define Package/bison
|
||||||
|
SECTION:=devel
|
||||||
|
CATEGORY:=Development
|
||||||
|
TITLE:=bison
|
||||||
|
URL:=http://www.gnu.org/software/bison/
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/bison/description
|
||||||
|
Bison is a general-purpose parser generator
|
||||||
|
endef
|
||||||
|
|
||||||
|
CONFIGURE_ARGS += --enable-threads=posix --disable-nls
|
||||||
|
|
||||||
|
define Package/bison/install
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin/
|
||||||
|
$(CP) \
|
||||||
|
$(PKG_INSTALL_DIR)/usr/bin/bison \
|
||||||
|
$(1)/usr/bin/
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,bison))
|
44
packages/devel/cargo-c/Makefile
Normal file
44
packages/devel/cargo-c/Makefile
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
#
|
||||||
|
# Copyright (C) 2024 Luca Barbato
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=cargo-c
|
||||||
|
PKG_VERSION:=0.9.32
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_URL:=https://codeload.github.com/lu-zero/cargo-c/tar.gz/v$(PKG_VERSION)?
|
||||||
|
PKG_HASH:=a96f3cc6c63d9901c9583083338d50b0132504bb067f68accc17f4116ed01f72
|
||||||
|
|
||||||
|
PKG_MAINTAINER:=Luca Barbato <lu_zero@luminem.org>
|
||||||
|
PKG_LICENSE:=MIT
|
||||||
|
PKG_LICENSE_FILES:=LICENSE
|
||||||
|
|
||||||
|
HOST_BUILD_DEPENDS:=rust/host
|
||||||
|
HOST_BUILD_PARALLEL:=1
|
||||||
|
PKG_HOST_ONLY:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/host-build.mk
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include ../../lang/rust/rust-host-build.mk
|
||||||
|
|
||||||
|
define Package/cargo-c
|
||||||
|
SECTION:=lang
|
||||||
|
CATEGORY:=Languages
|
||||||
|
SUBMENU:=Rust
|
||||||
|
TITLE:=Build and install rust crates as C libraries
|
||||||
|
DEPENDS:=$(RUST_ARCH_DEPENDS)
|
||||||
|
URL:=https://github.com/lu-zero/cargo-c
|
||||||
|
BUILDONLY:=1
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/cargo-c/description
|
||||||
|
Build and install crates with C bindings so they appear as normal
|
||||||
|
C libraries.
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call RustBinHostBuild))
|
||||||
|
$(eval $(call HostBuild))
|
||||||
|
$(eval $(call BuildPackage,cargo-c))
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user