Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source release #5

Merged
merged 3 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ on:

jobs:
release:
# We use Ubuntu 20.04 to have an older version of the file tool.
# If we used a newer Ubuntu it it would complain about incompatible magic
# file format on older Ubuntu versions.
runs-on: ubuntu-20.04
# Compiled magic files are incompatible with older and (for whatever
# reason) also newer versions of `file`.
# Therefore, we only release the concatenated, compressed source file.
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Make
run: sudo apt-get install make
run: sudo apt-get install make xz-utils

- name: Build
run: make all
run: |
make firmware
xz -f -7 -k firmware

- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: firmware.mgc
files: firmware.xz
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
fact
fact.mgc
firmware
firmware.mgc
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
all: firmware.mgc
all: mgc firmware

mgc: firmware.mgc

firmware.mgc: firmware
file -C -m firmware
Expand All @@ -9,3 +11,4 @@ firmware:
clean:
rm -f firmware
rm -f firmware.mgc
rm -f firmware.xz
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# A maigc database for firmware analysis
# A magic database for firmware analysis
This repository contains magic definitions for filetypes commonly found in firmwares.
This is a fork of [fact\_helper\_file][fact_helper_file]
and deletes all the code and just keeps the magic definitions (despite
[custom_mime_internal][custom_mime_internal]).
Thus this repository is also licensed under the GPLv3.
Thus, this repository is also licensed under the GPLv3.

## Installation
Run `make` to create a compiled mime database `firmware.mgc`.
Alternatively you can head over to the [releases][releases] and download the
compiled database from there.
Run `make` to create two files: A compiled mime database `firmware.mgc` and a
non-compiled mime database `firmware`.
Alternatively, you can head over to the [releases][releases] to download the
non-compiled database from there.
The downloaded file needs to be uncompressed before it can be used with `file`.
Note that the compiled database is only of use if your version of `file` is the
same as the version that the database was compiled.
For this reason, you can only download the non-compiled version.

For example you can put this in the directory shown by `file -v` to make use of
it when using the standart unix `file` tool.
Use these files by setting the `MAGIC` environment variable,
for more information see `magic(5)`.


[fact_helper_file]: https://github.com/fkie-cad/fact_helper_file/commit/17065a2d81bfdebd3425427eefaca9857087c763
[custom_mime_internal]: https://github.com/fkie-cad/fact_helper_file/blob/17065a2d81bfdebd3425427eefaca9857087c763/fact_helper_file/mime/custom_mime_internal
[releases]: https://github.com/maringuu/firmware-magic-database/releases
[releases]: https://github.com/fkie-cad/firmware-magic-database/releases
Loading