Commit Graph

48173 Commits

Author SHA1 Message Date
Adrien Destugues
86a58ccd34 Remove deprecated package manager mockup app.
* HaikuDepot was started from scratch and deprecates this.
2013-10-11 21:44:09 +02:00
Adrien Destugues
f9d987ae68 HttpRequest: put cookies in a single header entry
* Http spec says headers can be split when they are comma separated
 * However, cookies are semicolon separated, so it is not acceptable to
split them.
 * We will want to implement some way to limit the cookie header entry
size, as servers have a limit on what they can accept (usually around 4K
characters). The RFC also says we don't need to remember more than 20
cookies per domain.
2013-10-11 21:44:08 +02:00
Oliver Tappe
8b08992799 Implement shebang-fixup for /usr/bin/env to runtime_loader.
* silently replace invocations /usr/bin/env with /bin/env
2013-10-11 13:00:33 +02:00
Adrien Destugues
eab89314ce NetworkCookie: fix date validity check
* January 1st 1970 is a perfectly valid expiration date for a cookie,
and shouldn't magically turn it into a session cookie.
2013-10-11 08:32:28 +02:00
Adrien Destugues
185471c844 HttpRequest: follow 302 redirects by default. 2013-10-11 08:32:27 +02:00
Adrien Destugues
d05f9e2d3d BDateTime: Time_T functions return or take a time_t
* They used an unsigned int, which led to overflows when trying to set
them to a time before January 1st, 1970 (local time)
 * Some things use January 1st, 1970, GMT (or UTC) as a reference point.
In my timezone this leads to such a negative date. An example is cookie
expiration dates which are set to this date to expire them immediately.
Spotted by Opera testsuite.
 * This makes the method unuseable for dates after 2036 (signed 32-bit
time_t will overflow then. This gives us just 33 years to switch to a
64-bit time_t. In te meantime, please try using other methods to set the
date and time for BDateTime objects if you need to go this far.
2013-10-11 08:32:26 +02:00
Adrien Destugues
a5ac24f00c BUrl: add a Redirect method
* This takes a relative path as a parameter, and modifies the object to
point to the given location.
 * '..' is not handled yet, and will be sent as-is to the server.
 * Makes it possible to follow more types of 302 redirects

In particular, I can now run the tests from Opera's testsuite
(testsuite.opera.com), which shows I have more work to do on cookie
handling.
2013-10-11 08:32:25 +02:00
Oliver Tappe
56434332b1 Make some values of default build profiles overridable.
* Defining things like HAIKU_ROOT_USER_NAME in UserBuildConfig now 
  has an effect on the image again.
2013-10-10 23:45:55 +02:00
Ingo Weinhold
40b9ac787c Bootstrap image haikuports.config: Comment out PACKAGER
The developer building the packages should enter their own address
instead. I just noticed that a lot of the HaikuPorts package have a
packager attribute with the dummy address "The Haiku build system
<build-system@haiku-os.org>" due to the previous default value.
2013-10-10 23:19:48 +02:00
Ingo Weinhold
0ea8902c52 package daemon: Fix typo in error message 2013-10-10 21:49:10 +02:00
Ingo Weinhold
e3555ffae4 package daemon: ExtractPackageContent(): Extract only requested
... content path.
2013-10-10 21:48:52 +02:00
Ingo Weinhold
302a8fc86e package: Escape \ in usage text 2013-10-10 21:40:20 +02:00
Ingo Weinhold
97d30f2cfb Encode the hrev revision into the package versions 2013-10-10 21:38:07 +02:00
Ingo Weinhold
04d9b3e89c CopySetHaikuRevision: Pull out rule DetermineHaikuRevision 2013-10-10 21:37:27 +02:00
Jérôme Duval
4e238d5e68 iprowifi4965: Re-add working wlan card pciid
*removed in the last sync
2013-10-10 17:49:02 +02:00
Adrien Destugues
1b14a4e30b HaikuPorts repo: also add source packages. 2013-10-10 16:47:34 +02:00
Adrien Destugues
161bd06777 Add HaikuPorts packages to help with WebKit development
* Required: libxslt, fixed libxml2 and sqlite3
 * Extras: Caya, vim, and updated cmake
2013-10-10 14:46:03 +02:00
Rene Gollent
db74c31d28 Fix #10081.
- The format specifiers for the literal % symbols in the help text
weren't correct, leading to vfprintf attempting to parse them, and
winding up hitting garbage pointers as a consequence, leading to a crash.
2013-10-09 22:04:53 -04:00
Ingo Weinhold
111e76b755 Properly canonically name the boot loader package 2013-10-10 00:40:10 +02:00
Ingo Weinhold
28fcae227c Stage 1 boot loader: Load the first file matching haiku_loader*
This allows naming the boot loader package canoncically. Due to code
size limitations we cannot perform a more correct name check, but there
shouldn't be any other entries in the packages directory with a name
with "haiku_loader" prefix, anyway.
2013-10-10 00:40:10 +02:00
François Revol
d6de84de66 Allow stripping binaries when copying to image containers
Currently only needed for boot floppy on some platforms.

Disabled for now.

Note we do not have a mean of knowing which file is a binary
or not so we just try to strip, and silently continue when
strip fails (like on the kernel settings file).

Also note strip actually replaces the file, which means it looses
both the resources and attributes, which shouldn't be a problem
for the boot floppy drivers archive, but is not wanted for other
images, so it's not usable elsewhere as such. Patch wanted.
2013-10-09 22:04:36 +02:00
François Revol
c19c9e08ef libroot: Pass members to filter as on-target variable 2013-10-09 22:04:36 +02:00
François Revol
158604494b libroot: Style fix 2013-10-09 22:04:35 +02:00
Adrien Destugues
0e030f22e1 Allow cookies domain to not start with a dot
* The dot was mandatory in older RFCs, but the new RFC6265 disallow it.
 * Both schemes are used around the web, so we allow them both.

It's possible to login to mail.google.com again.
2013-10-09 15:50:33 +02:00
Adrien Destugues
8ca6eeb77c HttpRequest: missing fields initializations
* Some fields weren't initialized, leading to random crashes later on
 * Remove the enum that was used for protocol options
 * Use a single field to track the request state, instead of separate
booleans.
2013-10-09 15:46:10 +02:00
Adrien Destugues
a5826aafb0 Don't send a chunked transfer terminator for non-chunked transfers.
* Fixes oversight from previous change.
 * Thanks hamishm for watching !
2013-10-09 12:12:43 +02:00
Adrien Destugues
780967d8ac Cleanup and fix cookies handling
* The cookie jar iterator now use a BObjectList instead of a BList
 * Add a convenience method to the cookie jar to add a cookie by BUrl
and raw cookie string.
 * Remove some methods in BNetworkCookie that could lead to invalid
cookies (cross-domain or with no domain at all).
 * Make the cookie parsing able to report errors
 * Fix off-by-one error in domain cookies validation.
2013-10-09 12:08:46 +02:00
Rene Gollent
a24b8b8055 HaikuDepot: Wrap dependency resolution in try/catch block.
- Ensure that any exceptions thrown by the package kit are caught
  and handled.
2013-10-08 22:10:41 -04:00
Ingo Weinhold
a27d687e2a Name the generated HPKG files properly
* rule AddPackageFilesToHaikuImage: Add "flags" parameter. The only
  supported flag is "nameFromMetaInfo". It causes the packages to be
  copied under their canonical file name onto the image.
* Use the new flag for all generated packages save haiku_loader.hpkg.
2013-10-09 03:48:26 +02:00
Ingo Weinhold
16c8373026 package: Add "info" command
It allows to print individual information from the package meta data.
2013-10-09 03:48:26 +02:00
Ingo Weinhold
40c9cb7b47 rule AddFilesToContainer: Support naming files later
* Add "flags" parameter and only supported flag "computeName". When
  specified the "destName" argument is the name of a shell command
  or function that will be called to determine the destination file
  name when the container is built.
* AddFilesToHaikuImage: Pass flags to AddFilesToContainer.
2013-10-09 03:48:25 +02:00
Ingo Weinhold
066d508682 boot loader: Support loading haiku-*.hpkg
... i.e. properly canonically named Haiku system packages.
2013-10-09 03:48:25 +02:00
Ingo Weinhold
bd3bb3cf58 boot loader vfs.h: small cleanup 2013-10-09 03:48:25 +02:00
Ingo Weinhold
0262f55a51 boot loader heap: Remove left over debug variables 2013-10-09 03:48:25 +02:00
John Scipione
54c746641a Deskbar: Re-add tooltip code for truncated items
I accidentally removed it last commit, sorry about that.
2013-10-08 20:51:32 -04:00
John Scipione
4875d5a091 DeskBar: refactor expander code.
With the Tracker thread code in shared now it is possible to use the same
trick for the expanders in Deskbar to open and close in a separate thread
that we use in Tracker. See Find Panel and Info window for examples
of the code being used in Tracker.

Also eliminates the fClickedExpander variable and allow you to expand with any
mouse button.

Hopefully fixes #9676
2013-10-08 20:25:16 -04:00
John Scipione
285b7163ad MenuField: Filter out additional MouseDown messages.
...while mouse is down on a menufield

This makes it so that you can't open 2 menufields simultaneously
by clicking and holding the right mouse button on one menufield while
clicking a second with the the left mouse button opening it.

This matches the behavior on BeOS R5.

Should help with #6408 comment:9
2013-10-08 20:25:15 -04:00
John Scipione
fb6cc6d855 Move Thread classes from Tracker to shared
So that they may be utilized outside of Tracker
2013-10-08 20:25:15 -04:00
François Revol
4d5508263e libroot: Properly fix linking with libgcc without cmdline overflow
Instead of listing all the objects we want from the libgcc archive
we just make a copy of it and remove those we don't want, and link
to it.

This should allow returning MAXLINE in jam to a sane value.
2013-10-08 23:34:57 +02:00
Jérôme Duval
3ad66bf0d6 ipro1000: fixed the build after the 9.2 update 2013-10-08 23:17:42 +02:00
Jérôme Duval
d57b624667 Update FreeBSD network drivers with the 9.2 release 2013-10-08 23:17:41 +02:00
Ingo Weinhold
ea4f2ac2dc boot loader: Optimize heap implementation
* Increase general allocation alignment from 4 to 8 byte. That was even
  incorrect.
* Use a splay tree instead of a singly linked list to manage the free
  chunks. That increases the size of the per-chunk structure to manage
  the free chunks, i.e. the of minimally allocatable memory size (from
  align(sizeof(void*)) to align(3 * sizeof(void*))), but make finding
  and inserting chunks much faster.

Fixes #10063 respectively improves the situation significantly.
2013-10-08 21:03:50 +02:00
Ingo Weinhold
e1b63b4fb8 boot loader: mount_file_systems(): Fix warning 2013-10-08 21:03:50 +02:00
Ingo Weinhold
33def4258e boot loader: bios IA32: Add optional timestamps to debug output 2013-10-08 21:03:49 +02:00
Ingo Weinhold
908ce69d6e IteratableSplayTree: Add FindClosest() 2013-10-08 21:03:49 +02:00
John Scipione
e67f9c9bd1 Revert "MenuBar: Fix sticky menu issue. #6408 comment:9"
This reverts commit 7462734202.

Fixes #10072, breaks #6408 comment:9 again.
2013-10-08 13:29:56 -04:00
François Revol
c09cf60cc2 U-Boot: Remove duplicate target for <build>makebootable
And comment the use of libbe, which isn't needed for now and
didn't build anyway.
2013-10-08 19:04:53 +02:00
Adrien Destugues
afd547b368 Refactor UrlRequest/UrlProtocol in the Service Kit
* Remove the BUrlRequest class, which was only delegating work to
BUrlProtocol and subclasses
 * Rename BUrlProtocol to BUrlRequest, and BUrlRequestHttp to BHttpRequest
 * Creating a request is now done through the BUrlProtocolRoster. For
now there is just a static MakeRequest method, this will be completed
when we get to actually allowing add-ons to provide different request
handlers.

This allows cleanup of the API for requests:
 * Remove the universal SetOption method with constants, and have
dedicated setters for each protocol option.
 * Setters can now have multiple parameters, for example you can give
BHTTPRequest a BDataIO and a known size
 * In this case, the BHttpRequest will not use HTTP chunked transfers,
which were always used before and made most servers unhappy (tested and
failed with lighttpd, google accounts and github).
2013-10-08 11:42:05 +02:00
Rene Gollent
65e2db9f84 HaikuDepot: Add TODO note. 2013-10-07 23:07:00 -04:00
Rene Gollent
f2cf36df83 HaikuDepot: Resolve system dependencies.
- While building the installed package list, resolve the dependencies
  of the OS packages. Flag the resulting list as protected so as
  to disallow uninstallation of them in addition to the OS packages.
2013-10-07 23:06:39 -04:00